From d35d9d07400ffc3e33823a8d8f47babe31467997 Mon Sep 17 00:00:00 2001 From: Sunstrike Date: Fri, 18 Oct 2013 17:43:13 +0100 Subject: [PATCH] Fix chunk boundary rendering quirk. --- .../blocks/logic/AdaptiveSmelteryLogic.java | 15 +++++++++++++++ src/tconstruct/blocks/logic/TankAirLogic.java | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java b/src/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java index f5ffc00d..e2186077 100644 --- a/src/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java +++ b/src/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java @@ -40,6 +40,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc { byte direction; boolean updateFluids = false; + boolean updateAir = false; SmelteryScan structure = new SmelteryScan(this, TContent.smeltery, TContent.lavaTank); MultiFluidTank multitank = new MultiFluidTank(); SmelteryComponent smeltery = new SmelteryComponent(this, structure, multitank, 800); @@ -72,6 +73,12 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc distributeFluids(); updateFluids = false; } + + if (updateAir) + { + updateAir(); + updateAir = false; + } } if (tick >= 60) @@ -217,6 +224,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc itemstack.stackSize = getInventoryStackLimit(); } updateWorldBlock(slot, itemstack); + updateAir = true; } @Override @@ -250,6 +258,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc public void onInventoryChanged () { smeltery.updateTemperatures(); + updateAir = true; super.onInventoryChanged(); } @@ -377,6 +386,12 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc } } + public void updateAir() + { + for (CoordTuple loc : structure.airCoords) + worldObj.markBlockForUpdate(loc.x, loc.y, loc.z); + } + class LiquidData { public int totalAmount; diff --git a/src/tconstruct/blocks/logic/TankAirLogic.java b/src/tconstruct/blocks/logic/TankAirLogic.java index a75c459c..82c15cfa 100644 --- a/src/tconstruct/blocks/logic/TankAirLogic.java +++ b/src/tconstruct/blocks/logic/TankAirLogic.java @@ -59,7 +59,7 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) { itemstack.stackSize = getInventoryStackLimit(); - worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, itemstack == null ? 0 : itemstack.getItemDamage(), 3); + worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, itemstack.getItemDamage(), 3); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } @@ -175,6 +175,7 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide { readNetworkNBT(packet.data); worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } @Override