Disassembling Create contraption with TFC log pile causes block placed at the log pile's original location voided
Apot98 opened this issue ยท 3 comments
- Game Version and Mod Versions:
- Minecraft 1.20.1,
- Forge 47.2.6,
- TerraFirmaCraft 3.1.4-beta
- Create 0.5.1f
- Description:
- When a log pile block is assembled onto a Create contraption, then a new block is placed in its original position, that block would be voided when the contraption gets disassembled. If that block is a container, the block itself is voided, but items contained are dropped. This issue also exists in TFCTNG 1.18.2.
- Video:
https://github.com/TerraFirmaCraft/TerraFirmaCraft/assets/20492252/e7ac8e7f-66e9-41ff-aba8-c8f278a138b7
After investigating with dev environment, I can confirm that this issue is cause by MountedStorageManager copying block entity during addBlock(BlockPos, BlockEntity) method then empty this block entity during disassembling contraption, triggering voiding block at its coordinate. So perhaps mixin "protected void addBlock(BlockPos, Pair<StructureBlockInfo, BlockEntity>)" method in Contraption.java or "public void addBlock(BlockPos, BlockEntity)" in MountedStorageManager.java to mark the block entity, read the mark in LogPileBlockEntity's setAndUpdateSlots and prevent it from voiding block would do.