Naheulf Posted December 25, 2017 Posted December 25, 2017 Hello, With new capability system, how to detect if a slot is accessible through multiple sides ? For example : If a foo TileEntity has 3 slots. Slot "0" is accessible from top facing. Slot "1" is accessible only from all sides. Slot "2" is accessible from bottom side. IItemHandler topHandler = foo.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP); //Slots "0" and "1" IItemHandler bottomHandler = foo.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN); //Slots "1" and "2" IItemHandler internalHandler = foo.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); //Slots "0", "1" and "2" How to detect that slot slot "1" is included in topHandler and bottomHandler ? topHandler.getStackInSlot(1) == bottomHandler.getStackInSlot(0) // Not work if slot is empty or if getStackInSlot return an ItemStack.copy() Quote
Naheulf Posted December 25, 2017 Author Posted December 25, 2017 I try to debug Steve factory Manager in MC 1.10.2. This mod was create with the old ISidedInventory Interface. gigabit101 has include capability support but it does't work well (exemple). Quote
Recommended Posts
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.