Merge pull request #196 from CovertJaguar/patch-11

Updated Pipe TESR render dist check
This commit is contained in:
SirSengir 2012-08-31 01:26:11 -07:00
commit 7af23a7af3
2 changed files with 5 additions and 5 deletions

View file

@ -615,4 +615,9 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITank
} }
worldObj.markBlockAsNeedsUpdate(xCoord, yCoord, zCoord); worldObj.markBlockAsNeedsUpdate(xCoord, yCoord, zCoord);
} }
@Override
public double getRenderDistance() {
return 24;
}
} }

View file

@ -53,8 +53,6 @@ public class RenderPipe extends TileEntitySpecialRenderer {
final static private int displayLiquidStages = 40; final static private int displayLiquidStages = 40;
final static private int renderDistanceSq = 24 * 24;
final static private int numItemsToRender = 10; final static private int numItemsToRender = 10;
private final static EntityItem dummyEntityItem = new EntityItem(null); private final static EntityItem dummyEntityItem = new EntityItem(null);
@ -234,9 +232,6 @@ public class RenderPipe extends TileEntitySpecialRenderer {
if (BuildCraftCore.render == RenderMode.NoDynamic) if (BuildCraftCore.render == RenderMode.NoDynamic)
return; return;
if(tileentity.getDistanceFrom(tileEntityRenderer.playerX, tileEntityRenderer.playerY, tileEntityRenderer.playerZ) >= renderDistanceSq)
return;
initializeDisplayPowerList(tileentity.worldObj); initializeDisplayPowerList(tileentity.worldObj);
TileGenericPipe pipe = ((TileGenericPipe) tileentity); TileGenericPipe pipe = ((TileGenericPipe) tileentity);