Don't render fluid in disconnected pipes
This commit is contained in:
parent
0cbc63e919
commit
5dd82d7a95
1 changed files with 41 additions and 36 deletions
|
@ -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()];
|
||||
|
||||
|
|
Loading…
Reference in a new issue