Posted January 25, 20196 yr The old ISidedInventory interface supports the getSlotsForFace method, but as of newer forge versions one should use Capabilites. How would I implement this using Capabilities? I know that I can control if I want to return a Capability using the EnumFacing attribute of the getCapability function, but how can I make each side of the block correspond to certain slots just like SidedInventory does?
January 25, 20196 yr Generally, you'd do this by having different item handlers depending on the face, and return the appropriate one from getCapability(). As an example, a simple processing tile entity with one input and one output slot would have two item handlers (most likely a subclass of ItemStackHandler with isItemValid() overridden if necessary to filter what's allowed in there). Edited January 25, 20196 yr by desht
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.