Mekanism Generators

Mekanism Generators

97M Downloads

Cardboard boxes can dupe items with a custom `ItemEntity`

Technici4n opened this issue ยท 1 comments

commented

Issue description

Originally reported to AE2: AppliedEnergistics/Applied-Energistics-2#5402.

I think this is what happens:

  • 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.

Making Mekanism's event handler higher priority should address this issue, assuming cancelled events don't get passed to subsequent listeners.

Steps to reproduce

  1. Install AE2.
  2. Put charged certus quartz in a vanilla chest.
  3. Place a cardboard box around the chest, and watch the items get duped.

Minecraft version

1.16.5 (Latest)

Forge version

version 1.7.11 of All the Mods 6

Mekanism version

10.0.21 (Latest)

Other relevant versions

(not sure about the versions, but looked at the code from master)

If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)

No response

commented

Duplicate of #7053, oops.