Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Two things Minecraft is a client only class. And either Minecraft.getMinecraft is returning null and which means you are calling this too soon or Minecraft#player is null and which would also mean you are calling this too soon.
  2. isFlying != can fly. You need to set allowFlying to true.
  3. What you are going to have to do, is after all your recipes have been added, you will need to remove and re-add the recipes to the registry.
  4. He isn't using any static initializers.
  5. The recommended way of adding recipes is with a JSON, why would it be too many? Create them with code if that is easier.
  6. At the top of the page on this website or this link or even a google search.
  7. Use the registry events, they are documented in the forge docs.
  8. Do this instead when you initialize your ICapabilityProvider and its IItemHandler.
  9. From the code I can see you never load the ItemStacks into the IItemHandler.
  10. A Gui and Container should do this automatically, but instead of instantiating the inventory from the nbt for the container. You should instantiate an IItemHandler capability based on the nbt.
  11. I'm not sure if it is necessary. However a good way to check would be to test your mod on a dedicated server. And it may not work all the time.
  12. Use a key press event and send a packet if the player is riding your entity and then make it jump.
  13. Make "jump power" a constant and use the jumping code, aka modify the code to fit your means.
  14. Check out the forge docs on BlockStates.
  15. Are you even adding your storage data to the ItemStack?
  16. Using Item.getItemFromBlock will return the ItemBlock for your block so long as it has been registered.
  17. You can register the class if your methods are static, though I agree the annotation is neater.
  18. So the problem isn't having a class like BlockBase, but with how a lot of people are using it. Well of course it does. ?
  19. I don't see this being ineffective or in any way counterproductive. It might need a rename of sorts, maybe "DecorativeBlock". Seeing as how it is useful for simple stuff such as Solid Blocks IE a solid block of steel. But it is more simply a way to cut down on writing similar code.
  20. Well if you want the functionality of BlockFalling you have to have the code in it apply to your block. Which normally means to extend it, but you also want the functionality of your BlockBase class. So here your solution would be recreating the constructor to simulate your BlockBase while extending BlockFalling or recreating the functionality of BlockFalling and extend BlockBase. The first one being the easiest. Ultimately a Java problem not a forge problem.
  21. Learn Java. Constructors and supers are basics of polymorphism.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.