From 18a310ba3a0e210d38125ac52a7a74926ef1527b Mon Sep 17 00:00:00 2001 From: abel1502 Date: Mon, 30 Jun 2025 00:24:55 +0300 Subject: [PATCH] Prevent pseudomultiblocks disappearing on chunk boundaries If this was indeed a problem, it must've been one before my PR... I suspect maybe some of my intermediate implementations allowed this to have an effect. Regardless, this is definitely a useful fix --- src/main/java/com/hbm/blocks/BlockDummyable.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/hbm/blocks/BlockDummyable.java b/src/main/java/com/hbm/blocks/BlockDummyable.java index 0d7fa08b4..19c33db65 100644 --- a/src/main/java/com/hbm/blocks/BlockDummyable.java +++ b/src/main/java/com/hbm/blocks/BlockDummyable.java @@ -103,7 +103,12 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl ForgeDirection dir = ForgeDirection.getOrientation(metadata).getOpposite(); Block b = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ); - if(b != this) { + // An extra precaution against multiblocks on chunk borders being erroneously deleted. + // Technically, this might be used to persist ghost dummy blocks by manipulating + // loaded chunks and block destruction, but this gives no benefit to the player, + // cannot be done accidentally, and is definitely preferable to multiblocks + // just vanishing when their chunks are unloaded in an unlucky way. + if(b != this && world.checkChunksExist(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1)) { if (isLegacyMonoblock(world, x, y, z)) { fixLegacyMonoblock(world, x, y, z); } else {