Started by
Barcat0
on
Topic category: Help with Minecraft modding (Java Edition)
I'm working on a tycoon-like mod that uses a collector to collect items from a conveyor belt, but I currently have to use a hopper to get items into it. How would I make the collector itself actually collect the items like a hopper?
I've been stumped googling that I've decided to resort to the forums.
Can anyone help?
Try finding item entities that are above the block, and putting them into the block's inventory if there are any. Then check if there is a container directly below the block, and deposit items there.
But how would I actually go about grabbing whatever item is above it as well as putting it in its inventory?
So, update: I got something working after many failed attempts, however, it's now replacing the item in there and adding one.
For instance:
there is 20 cobblestone in it's slot. 1 piece of coal is collected, and the total is now 21 coal. AKA it's replacing the first slot, no matter if it's already taken up, and replacing it with it;s own and adding +1 to it...
I don't know how to fix it without breaking it.
Got it fixed, eventually...
How did you do it Barcat0? If you don't mind me asking, I would love to know.