Posted August 17, 20196 yr Im exploring the 1.14.4 way of handle items with tileentities and containers. im able to build some chests for holding items etc., but i cant figure out how to generate items like a furnace in a result Slot. i tried to use the insertItem method from the IItemHandler in the tick() method, but it takes no effect handler.ifPresent(h -> h.insertItem(4, new ItemStack(Items.IRON_INGOT), false)); or getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).map(h -> h.insertItem(4, new ItemStack(Items.IRON_INGOT), false)); whats the correct way? thx for any hints
August 17, 20196 yr Author ah ok thx. i figured out, it needs a true condition in the isItemValid() method from IItemHandler for the result slot as well as for the Input Slots. now its working… (Im porting my stuff from 1.13.2 where i used the ISidedInventory implementation, but the ItemHandler stuff seems to be more comfortable)
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.