Digital Miner Shulker Box Duplication Bug
focamacho opened this issue ยท 4 comments
Issue description:
You can duplicate shulker boxes using a Digital Miner(It duplicates only the Shulker Box, not the items inside)
Steps to reproduce:
- Place a Digital Miner in the ground
- Place a Shulker Box in the ground
- Put any item inside the Shulker Box
- Set a filter in the Digital Miner to mine the Shulker Box(Fuzzy Mode:ON)
- Turn on the digital miner
- Digital Miner will collect a Shulker Box, and at the same time, one shulker box is dropped on the ground. (See the video for more info)
Version (make sure you are on the latest version before reporting):
Forge: 1.12.2 - 14.23.5.2836
Mekanism: Mekanism-1.12.2-9.7.3.374
If a (crash)log is relevant for this issue, link it here:
I tested some other mods:
Vertical Digger(Actually Additions): It is the same as digital miner, takes an empty box, and drops one with items.
Auto-Breaker(Actually Additions): Same thing.
Block Breaker(Industrial Foregoing): Drop all items on the floor and pick up an empty box (https://imgur.com/a/ikfpqr4)
Mechanical Miner(Extra Utilities 2): Works exactly how it should work, take the box with the items inside and do not drop anything.
Builder + Quarry Card(RFTools): Works the same as mechanical miner, without any problem.
The only way to make things like this respond properly to a block break is to do it like AE does for annihilation planes: break the block then capture the dropped items in the blockspace.
Started looking into this slightly, and a few different things seem to be going on.
- The reason there is no dupe of the items inside seems to be because shulker boxes handle that and drop themselves on the break event. (We need to somehow figure this out and have it so the items get stored. This will cause the items inside to also get duped, but that should already be happening and is a bug that it is not.)
- The reason the box itself is duping is that given it is manually dropping itself when we tell it that it was broken, a second one gets created by setting it to air.
I think what is likely going to need to be done is to have special handling for the shulker box where we duplicate the code so that we get the proper drop NBT, and then we clear the shulker box so that the one in world does not get dropped. The question I will have to look into however, is there some better way to do it so that we have better support if some modded block behaves the same way.
#5456 (comment) for reference of what we ended up doing. We will release 9.7.4 later today with this fix and a few other fixes.