From 51c616852764c038745658fd4055c73261d0b84e Mon Sep 17 00:00:00 2001 From: Astoria Date: Sun, 2 Apr 2023 10:18:24 -0500 Subject: [PATCH] Update all at once --- .../afloydwiremod/tile/RedstoneLinkTile.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/net/brokenmoon/afloydwiremod/tile/RedstoneLinkTile.java b/src/main/java/net/brokenmoon/afloydwiremod/tile/RedstoneLinkTile.java index b369396..9bb4fbc 100644 --- a/src/main/java/net/brokenmoon/afloydwiremod/tile/RedstoneLinkTile.java +++ b/src/main/java/net/brokenmoon/afloydwiremod/tile/RedstoneLinkTile.java @@ -41,12 +41,24 @@ public class RedstoneLinkTile extends AbstractWireTile { if (world.getBlockMetadata(x, y, z) == 0) { world.setBlockTileEntity(x, y, z, new RedstoneLinkTileEntity()); } + world.notifyBlocksOfNeighborChange(x, y - 1, z, this.blockID); + world.notifyBlocksOfNeighborChange(x, y + 1, z, this.blockID); + world.notifyBlocksOfNeighborChange(x - 1, y, z, this.blockID); + world.notifyBlocksOfNeighborChange(x + 1, y, z, this.blockID); + world.notifyBlocksOfNeighborChange(x, y, z - 1, this.blockID); + world.notifyBlocksOfNeighborChange(x, y, z + 1, this.blockID); } @Override public void onBlockRemoval(World world, int x, int y, int z) { if (world.getBlockTileEntity(x, y, z) != null && !((RedstoneLinkTileEntity) world.getBlockTileEntity(x, y, z)).shouldnotremove) super.onBlockRemoval(world, x, y, z); + world.notifyBlocksOfNeighborChange(x, y - 1, z, this.blockID); + world.notifyBlocksOfNeighborChange(x, y + 1, z, this.blockID); + world.notifyBlocksOfNeighborChange(x - 1, y, z, this.blockID); + world.notifyBlocksOfNeighborChange(x + 1, y, z, this.blockID); + world.notifyBlocksOfNeighborChange(x, y, z - 1, this.blockID); + world.notifyBlocksOfNeighborChange(x, y, z + 1, this.blockID); } @Override