Topic category: Help with modding (Java Edition)
I am trying to make a block that functions similarly to a hopper. I just want it to put an item from its inventory to an adjacent block's inventory.
I don't know how to detect if a block has an inventory, nor what the number of slots it might have? Is there a way to do this? Or perhaps is there a better way of iterating through all the slots in an inventory. I'm not opposed to writing custom code if necessary.
As a bonus question, I was wondering how you would detect dropped items above a block. Not what I'm trying to do here; just wondering.