MinecraftByExample icon indicating copy to clipboard operation
MinecraftByExample copied to clipboard

[1.15/1.16] Item Inventory example bugged

Open capnkirok opened this issue 4 years ago • 3 comments

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.

capnkirok avatar Feb 27 '21 22:02 capnkirok

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

TheGreyGhost avatar Mar 01 '21 10:03 TheGreyGhost

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

capnkirok avatar Apr 11 '21 18:04 capnkirok

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

TheGreyGhost avatar Apr 16 '21 05:04 TheGreyGhost