mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
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
This commit is contained in:
parent
d1497abd1e
commit
18a310ba3a
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user