diff --git a/src/main/java/com/elytradev/infraredstone/tile/TileEntityGateNot.java b/src/main/java/com/elytradev/infraredstone/tile/TileEntityGateNot.java index 87599d0..4af3c52 100644 --- a/src/main/java/com/elytradev/infraredstone/tile/TileEntityGateNot.java +++ b/src/main/java/com/elytradev/infraredstone/tile/TileEntityGateNot.java @@ -154,8 +154,10 @@ public SPacketUpdateTileEntity getUpdatePacket() { @Override public void handleUpdateTag(NBTTagCompound tag) { readFromNBT(tag); - IBlockState state = world.getBlockState(pos); - getWorld().markAndNotifyBlock(pos, world.getChunk(pos), state, state, 1 | 2 | 16); + if (lastBooleanMode!=booleanMode) { + world.markBlockRangeForRenderUpdate(pos, pos); + lastBooleanMode = booleanMode; + } } @Override diff --git a/src/main/java/com/elytradev/infraredstone/tile/TileEntityGateXor.java b/src/main/java/com/elytradev/infraredstone/tile/TileEntityGateXor.java index 1e382ac..1fb4db2 100644 --- a/src/main/java/com/elytradev/infraredstone/tile/TileEntityGateXor.java +++ b/src/main/java/com/elytradev/infraredstone/tile/TileEntityGateXor.java @@ -168,8 +168,10 @@ public SPacketUpdateTileEntity getUpdatePacket() { @Override public void handleUpdateTag(NBTTagCompound tag) { readFromNBT(tag); - IBlockState state = world.getBlockState(pos); - getWorld().markAndNotifyBlock(pos, world.getChunk(pos), state, state, 1 | 2 | 16); + if (lastBooleanMode!=booleanMode) { + world.markBlockRangeForRenderUpdate(pos, pos); + lastBooleanMode = booleanMode; + } } @Override @@ -184,7 +186,7 @@ public void markDirty() { if (!hasWorld() || getWorld().isRemote) return; if (isActive()!=lastActive - ||valLeft!=lastValLeft + || valLeft!=lastValLeft || valRight!=lastValRight || booleanMode!=lastBooleanMode) { //Throttle updates - only send when something important changes @@ -220,7 +222,7 @@ public void markDirty() { lastActive = isActive(); lastValLeft = valLeft; lastValRight = valRight; - booleanMode = lastBooleanMode; + lastBooleanMode = booleanMode; } }