Topic category: Help with Minecraft modding (Java Edition)
Hello y'all :3
I am currently making a minecraft 1.21.1 neoforge mod with MCreator 2025.2 and Nerdy's New Curios API Plugin. But I've run into an issue that I am now thoroughly stuck on, and was unable to solve by myself as I could find no resources on the matter online. I hope someone here could give me a bit of guidance for this topic.
I have created a backpack-like item that has inventory capability with 9 slots for the player to store other items. When the backpack-like item is equipped in a curios slot, I want the player to be able to open its bound inventory GUI with a keybind. Locating the item within the curios slots isn't an issue, but accessing the specific item's inventory via the GUI is. I've tried a few things with custom code (both by myself and with AI), but so far I've not been able to get it to work.
I doubt that this can be done just with mcreator procedure blocks, but I've got no problems with using custom code. So if someone could sit down with me and explain to me how exactly to implement this and how it works, that'd be greatly appreciated :3
can the backpack be opened by just holding it and right clicking?
Yes, that part works. But it's a bit cumbersome to remove it from the curios slot and open it that way each time, so I also wanted to have the "open with keybind when equipped" thing for convenience's sake.
damz i thought this would work,
but it looks like the code for guis in mcreator just get the item from the player's hand anyway when it comes to populating it...
The last thing I tried was to access my GUIs IItemHandler internal attribute to sync up the shown GUI with the inventory of the equipped backpack-like item, but so far I've had no luck with that.