Quarry dropping block inventories [1.10.2]
Opened this issue ยท 13 comments
When quarrying blocks with inventories (chests, hoppers, dispensers, etc.) the block is taken and it's inventory is dumped all over the ground. I confirmed this by cheesing over a Roguelike Dungeon. And wandering the dirt corridors picking up things.
RF Tools 1.10-5.59, MC 1.10.2, ModPack "All the Mods" with some changes
That's not a bug. That's just normal behaviour that happens when such a block is broken
Any chance of having the quarry check for inventory and collect it with the block? It's a bit meta to take a chest and leave the contents. [Plus I was spoiled by the EU quarry.]
I can't collect it with the block as a chest can't be picked up with items in it but I might consider adding an option to suck up the items somehow. Have to be very careful with this though
Thanks.
I don't know the MC/Forge APIs, but maybe there's a hasInventory check you could do prior to breaking?
Checking for inventory is not the problem. That's easy. The problem is deciding what to do with the contents. There are modded blocks for which you're not supposed to be able to just pull out items from the inventory. Or some modded blocks do things when items are removed. Solving this in general might be problematic
I see. Even if there's a GUI, it doesn't mean the inventory is accessible. Blocks could be collected with inventory, but that might also not be the mod maker's wish. Maybe it could just collect inventory for a limited set of mods. I expect grabbing vanilla, bees, the chest mods, and a couple other things would cover most of the spillable inventories. Maybe check for inventory and if so check against a mod list (config file?).
I discovered this issue as well when using the silk quarry. I was wondering why things like bee hives (spawned, not built) and spawners were left floating around the chests. Even minecarts with chest were left alone. I redid the quarry without silk touch and got the spawner shards, but not the ender shards, the bee's and their drops, the chests, but not contents. If it can't pick them up, i'd love to see a way where they are highlighted so i know where to go looking. in a 512x512 quarry, that's a lot of ground to look over.
I would think check for a valid inventory and collect the items before collecting the (now empty) inventory. I don't see any public code for Extra Utilities 1 (the ender quarry used to grab items too). Maybe you could ask RWTema how he did it?
I currently don't see a way to solve this. The vanilla chest simply drops items on the floor when it is broken. I have no way with the builder to intercept those as they can fly everywhere literally. So unless someone comes up with some nice idea there is not much that I can do here
Could we have an option to leave things like chests alone so we could collect them later? (most useful on a clearing quarry)
I just encountered this problem, and solved it. Create a Storage Filter Module. Place a chest on the ground with another chest inside it (because it wont scan a chest directly), Shift right click the filter on the chest, right click in the air to open filter gui and set filter to blacklist chests. I suggest blacklisting minecart chests and torches too. (I initially wanted to whitelist spawners from a roguelike but that didn't work, so I'm just destroying the whole thing instead)
Just found this thread and wanted to toss out a few ideas.
Is it possible to check whether a block drops its inventory when broken?
A toggle that sets the builder to check whether the block has an inventory could be made, and if enabled have one or more of the following behaviors:
- Skip all blocks with inventories
- Skip only blocks with inventories that drop when broken (blocks that don't drop their inventories would be broken as normal)
- Skip all blocks with inventories that aren't on a whitelist file (this would be intended for modpack builders to allow only grabbing certain containers)
If the ability to pull the inventory first is added, the following are some other behavior ideas:
- Pull all inventories (simple, but not good for reasons you stated before)
- Pull inventories from a whitelist (same idea as before, allowing for grabbing the inventory of certain blocks and ignoring anything else)
There's probably more but I wanted to know how you feel about the possibility of looking into this more.
As this kinda of thing is very hard to do. I'd likely suggest just making sure you're not mining through anything. If you lose some items in a chest from a dungeon, I some what doubt you'll be too sad about it. You could also filter out the chest. Please reopen if you feel this isn't enough.