Posted September 14, 20178 yr Hello, My goal is to create a custom inventory slot, next to the already existing armor slots. I'm not entirely sure how to accomplish this, but I've read some things online about forge capabilities. It seems like the best way to go, except there doesn't seem to be much information on it. Could anyone help get me started?
September 29, 20177 yr Author On 9/14/2017 at 3:18 PM, diesieben07 said: For example you do not need a separate interface and implementation class, you can just make a class that extends ItemStackHandler and use that as your capability. So I'm not sure I completely follow you. I've created a class that extends ItemStackHandler, but I'm not sure what goes in there since I'm not creating an interface class. And since I don't need a capability provider, what would I put in the second parameter of event#addCapability()? @SubscribeEvent public void attachCapability(AttachCapabilitiesEvent<Entity> event) { if (event.getObject() instanceof EntityPlayer) { event.addCapability(INV_SLOT,); } }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.