Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Novârch

  1. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  2. Please think about this for a moment, where do you reference a milk capacity in those methods? Nowhere.
  3. LivingEntity#removePotionEffect(Effect) Edit: Oof, thought you meant a potion effect, I should really take my time and read these in detail.
  4. First of all, don't reference FMLJavaModLoadingContext directly from that class, put it as a parameter in the PotionRegistryHandler#init method, second of all, you never even register your potions by calling EFFECTS#register, and lastly, your DeferredRegisters have their names mixed up, the first one is for effects and the second one is for potions.
  5. You need an interface to make a capability, I'd say you should call it IPet, Pet should implement it and you should pass in IPet in @CapabilityInject and the first parameter of register. The interface should look something like this with what you're currently doing: public interface IExample { EntityType<?> getEntityType(); void setEntityType(EntityType<?> type); } I strongly recommend you use generics instead if you can, something like this: public interface IExample { <T extends Entity> EntityType<T> getEntityType(); <T extends Entity> void setEntityType(EntityType<T> type); } Ping me or something next post, I'll help you out if I can. Edit: Oh come on, solved as I was posting.
  6. private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.OAK_PLANKS, Blocks.SPRUCE_PLANKS, Blocks.BIRCH_PLANKS) Pretty much the same as in AxeItem, edited some stuff to avoid breaching Mojang's copyright. Remember that you need a class that extends ToolItem (at least in 1.15, but I don't think that changed in 1.16).
  7. Of course there is, change some version numbers in your mods.toml and build.gradle and voila, you're on 1.16, it's pretty obvious which ones you should change, but if you aren't sure I recommend setting up a 1.16 project from the MDK and copying it from that. On a separate note, I personally recommend you stay away from 1.16 Forge until it gets a recommended release.
  8. It's just a parameter, pass it in, but you can't directly reference the one in AxeItem as it's private, if you really don't want to copy it,
  9. Pretty easy, actually. You've got the random generation down, don't change it, as for the PlayerEntity#dropItem method requiring an ItemStack, if you took literally 1 second to look at ItemStack, you'd see that it has a constructor that takes in an Item. If you can solve a crossword puzzle, you can translate 1.12 item code to 1.15, barely anything had changed (excluding metadata, of course).
  10. Novârch


    Seems client commands are currently impossible. Edit: What about a keybind, I think you could use that.
  11. You could copy the EFFECTIVE_ON field from AxeItem, ShovelItem or PickaxeItem and pass it into the ToolType constructor, or if you're super paranoid like me, use some reflection or AT's to get direct access to the field so you don't have to copy Mojang's code.
  12. Neat, I'll try to help you with that one, Brigadier command syntax is incredible.
  13. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  14. I'm gonna take a wild guess and say you're calling the method on the player, I can't be certain without seeing your code.
  15. Well look through the code and find out, it has to be somewhere, my guess is 0 for the saddle and 1 for the armor.
  16. Take a look at BrewingStandTileEntity and CauldronBlock, you seem to desire a mix of them.
  17. This is just from a first glance, so take it with a grain of salt, EE3 seems to write the player's UUID to the ItemStack-s NBT, this is very hard to follow because of the mods' heavy use of util classes, but can be deciphered with some time, I'll give you the link to the item on GitHub, beware it's for 1.12 though, but I think NBT hasn't really changed since day 1.
  18. Make your own thread if you want help. If you can't understand the source it's very unlikely you can actually make it yourself, if you want to make a mod, learn Java, get acquainted with Forge and Minecraft, and then do what you want, asking for help when you don't understand Forge/Java will get you nowhere long-term.
  19. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  20. 1.16 is still in Beta and doesn't have real mappings ready yet, the current mappings are handmade, I honestly recommend you don't use 1.16 yet, but if you really want to you could fire up a Forge 1.15 project and look at the classes there, they're basically the same.
  21. That method cannot be what you're looking for, it's static and you can't override static methods, look for another method.
  22. You don't need a tutorial to do something, take a look at the vanilla code, I believe it's all in net.minecraft.client.gui
  23. You're trying to override a static method, you can't do that, and it doesn't even make sense.
  24. You cannot override static methods, that is basic Java, it doesn't make any sense.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.