TheGreyGhost / MinecraftByExample

Working sample code for the basic concepts in Minecraft and Forge.
Other
1.24k stars 187 forks source link

[1.15/1.16] Item Inventory example bugged #69

Open capnkirok opened 3 years ago

capnkirok commented 3 years ago

I used the Item Inventory code from your tutorial as a base for Inventory Pets Chest and Feed Bag pets, but then ran into a nasty and unsolved issue: https://github.com/MinecraftForge/MinecraftForge/pull/4594

Basically, using any inventory item with similar functionality when on a server in creative mode clears the contents of the itemstack inventory. I would remove this example since it has caused significant frustration from players, and does not look like will be solved anytime soon by Minecraft or Forge.

Since you've written this tutorial, all of the above mods, including Botania, have rewritten their code completely as a result.

TheGreyGhost commented 3 years ago

Howdy That's annoying. The whole capability system is a bit underbaked IMHO and if Botania have refactored to get rid of it then that's a grim sign.

I'll have a look (in the next week with any luck) and try to figure out the best way forward

Thanks for letting me know!

-TGG

capnkirok commented 3 years ago

Following up on this. I ended up using a similar approach to SimplyBackpacks, which works very well (and also doesn't involve core mods or reflection) https://github.com/Flanks255/simplybackpacks/tree/master/src/main/java/com/flanks255/simplybackpacks

TheGreyGhost commented 3 years ago

Howdy Thanks for the updated info. When I get a chance I'll review those and either replace the flowerbag or at least cross-reference it with a warning Cheers TGG