Don't render fluid in disconnected pipes

This commit is contained in:
CovertJaguar 2013-11-29 19:32:45 -08:00
parent 0cbc63e919
commit 5dd82d7a95

View file

@ -593,15 +593,21 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer {
boolean sides = false, above = false;
for (int i = 0; i < 6; ++i) {
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
int i = side.ordinal();
FluidStack fluidStack = trans.renderCache[i];
if (fluidStack != null && fluidStack.amount > 0) {
if (fluidStack == null || fluidStack.amount <= 0)
continue;
if (!pipe.container.isPipeConnected(side))
continue;
DisplayFluidList d = getListFromBuffer(fluidStack, pipe.container.worldObj);
if (d == null) {
if (d == null)
continue;
}
int stage = (int) ((float) fluidStack.amount / (float) (trans.getCapacity()) * (LIQUID_STAGES - 1));
@ -636,7 +642,6 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer {
GL11.glCallList(list);
GL11.glPopMatrix();
}
}
// CENTER
FluidStack fluidStack = trans.renderCache[ForgeDirection.UNKNOWN.ordinal()];