Added distance check to pipe render code limiting rendering to 32 blocks away.
This commit is contained in:
parent
d6f5adac9e
commit
47eff20cb5
1 changed files with 6 additions and 1 deletions
|
@ -45,7 +45,9 @@ public class RenderPipe extends TileEntitySpecialRenderer {
|
|||
|
||||
final static private int maxPower = 1000;
|
||||
|
||||
final static private int displayLiquidStages = 40;
|
||||
final static private int displayLiquidStages = 40;
|
||||
|
||||
final static private int renderDistanceSq = 1024; // 32 tiles
|
||||
|
||||
private final static EntityItem dummyEntityItem = new EntityItem(null);
|
||||
|
||||
|
@ -214,6 +216,9 @@ public class RenderPipe extends TileEntitySpecialRenderer {
|
|||
|
||||
if (BuildCraftCore.render == RenderMode.NoDynamic)
|
||||
return;
|
||||
|
||||
if(tileentity.getDistanceFrom(tileEntityRenderer.playerX, tileEntityRenderer.playerY, tileEntityRenderer.playerZ) >= renderDistanceSq)
|
||||
return;
|
||||
|
||||
initializeDisplayPowerList(tileentity.worldObj);
|
||||
|
||||
|
|
Loading…
Reference in a new issue