Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Check out AxeItem or HoeItem or ShovelItem. They all do it. I think the iron golems are handled in the Pumpkin blocks class. You'll need to override onBlockPlacedBy in your Blocks class. And if they aren't your blocks you'll need to use an event. I think BlockEvent.Placed? I'm not sure about the name.
  2. You cant just store values like this in the Item. There is only one instance of your Item you need to store it in the ItemStack. Either via a capability or just the stacks CompoundNBT/tag.
  3. Did you register it only on the client/attaching it only on the client?
  4. Logger#debug or Logger#info (I would use the first one)
  5. Well yes, but you might as well do it in all of them.
  6. That's not how you set it up with intellij idea. I dont have much experience with it, but I believe you have to treat it as a gradle project in idea. It downloads all the dependencies including opengl.
  7. And what I'm saying is it isnt for making mods. There wont be very many made/updated on that version either. It's not even being worked on anymore. Test it find out which button(s) causing the problem it might have to do with the packets as well.
  8. First off this is client only you cant use this. Secondly I dont see this method in your code.
  9. First update to 1.14.4. If you are willing to use eclipse run "gradlew eclipse genEclipseRuns" then immediately "gradlew runClient" to see if it runs.
  10. The problem might be that the gui hasn't actually closed on the player however. Update to 1.14.4 btw. 1.13 was an in between version and still quite buggy.
  11. Yes there is a way. If I'm not mistaken there is PlayerEvent.OnCrafted which is fired after the player takes the item out of the slot. But I have a feeling this isnt quite what you want. However if your goal is to just apply something at random to the ItemStack then this would work. Or there is another approach with Capabilities you could try. Attach a capability onto all ItemStacks. Which will allow you to give it extra data. Then there is a ToolTipHovering event or something like that. Which you can use to display information about the item.
  12. This is fine it's exactly what it is meant for. However you seem to have been following a bad tutorial. You shouldn't register any registry object (Item, Block, Enchantment, etc) outside of its registry event. Aka dont statically initialize them. The problem is you dont have and model json or blockstate json. Those links aren't tutorials might not help much, but you can look at the vanilla ones under assets.minecraft.blockstates and assets.minecraft.models And they need to be in your folder called assets.[modid].whatever path here And textures are under assets.[modid].textures.[item/block]
  13. Have you added log statements to the read and write methods?
  14. Clicking is processed in the Container which is client and server. Override slotClick or onSlotClick(its one of those) and perform your action there. Then update the player by calling sendAndDetectChanges.
  15. I'm sorry what does this mean? Like it's not a player connected to the server? I have a problem with your question in particular. Commands are executed on the server. So the sequence goes more like this Client sends chat message with command->Server receives message and executes command... here is where I'm confused. Now you need to send the string back to the client? Send the packet to the player who issued the command.
  16. Check out any of the leaves loot table jsons. It will show you how.
  17. The problem is your use of iTag.hasUniqueId you can always be assured that the tag wont be null so dont do it. And the get methods will always return a value even if it's not present.
  18. No you dont do this. Make a variable? What are you trying to do from an end user perspective?
  19. I like to think they are easier to use. Typically you wouldn't register the class itself, but instead use the @EventBusSubscriber annotation. But that's what having the annotation does. It registers the class.
  20. No no yes. The only restrictions are it has to be lower case, only certain character; I believe alphanumeric and underscores allowed, and 64 or less characters. Though you shouldn't abbreviate too much like gm, fr, or ae.
  21. I also tried to update to 28.0.91. However it couldn't find the download and when I switched back to the older version it couldn't find that. I think there is a problem with the download servers. It should be fixed here soon.
  22. The answer is yes and no. You cannot create a new Block instance to act as another block. Yes you can procedurally generate "new Blocks". What you need to do is create one Block with a TileEntity(stores all the data necessary) with an IBakedModel perhaps some other render/resource related things.
×
×
  • Create New...

Important Information

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