Fix chunk boundary rendering quirk.

This commit is contained in:
Sunstrike committed 2013-10-18 17:43:13 +01:00
1 parent 105c188167
commit d35d9d0740
2 files changed
+17 -1

No files matched your search

@@ -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;
@@ -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