Charged Certus duplication glitch
hallowfiend opened this issue ยท 4 comments
It's possible to duplicate Charged Certus Quartz, and only Charged Certus Quartz, by using Mekanism's cardboard boxes.
Describe the bug
Placing a cardboard box on top of any chest-like storage container (I discovered it trying to move a chest from the Iron Chests mod, but it works with vanilla chests) with Charged Certus Quartz inside will cause the quartz to drop as an item outside the box, but the exact same amount of quartz will still be inside of the container once the box is removed. This glitch, as far as I can tell, cannot be replicated with any other item.
This could potentially be an issue with Mekanism, or maybe the modpack, but since it only works on this specific item from AE2, I decided to put the issue here.
To Reproduce
- Place down storage container.
- Put any amount of Charged Certus Quartz inside.
- Put a cardboard box on it by right clicking.
- Remove cardboard box from container by shift and right clicking.
Expected behavior
I expected the box to simply encase the chest along with its contents, not duping anything.
Environment
- Environment: I am playing on version 1.7.11 of All the Mods 6, with no additional mods installed.
This is likely still an issue, the root cause of which is:
- Mekanism uses
EntityJoinWorldEvent
to cancel any item drop that happens when it is removing the tile entity. Pseudo code:
startCancelingItemDrops();
setBlockState(world, pos, air);
stopCancelingItemDrops();
- Forge uses
EntityJoinWorldEvent
to cancel item drops for stacks that have a custom item entity, and then schedules the spawn of the custom entity the next tick, which Mekanism doesn't detect.