Obligatory disclaimer... I have extremely little prior java experience. I've gone through several online guides and exercises, but by no means am I well versed in it, nor Eclipse (my IDE). Obviously this is also my first mod.
I have been trying to implement a basic backpack (craft and use it). Nothing fancy, but this is a key stepping stone for my mod. Successes thus far - Getting my mod info to show in MC, getting the item to appear, getting the model to appear (it has, however, disappeared in the mean time), implementing a crafting recipe for the backpack.
However... it doesn't do anything. I've scoured the internet, but I've only found examples for IInventory (Which should not be used anymore?) or half implementations. Stuck with the half implementations, a few 1.12 guides on making a chest... this is the basics of what I have. Is there any theoretical errors? Will post code, but I first want to know if my theory is wrong.
Item class, produced by crafting recipe. This contains an IItemStackHandler, and a custom capability that implements ICapabilityProvider. The onRightClick action result override calls a gui to open. It also overrides initCapabilities to provide the custom capability.
Custom capability contains an IItemHandler.
I have a container, gui and gui proxy. The gui proxy gets called, but crashes when the container adds the slots for the item. Container's code:
Any ideas? Hints? Directions to a 1.12 tutorial on implementing backpacks...? (I've been through multiple githubs, but the amount of extra's (honestly) confuses me so much I can't identify what the basic implementation is).