aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/goodgenerator/blocks/tileEntity/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/goodgenerator/blocks/tileEntity/render')
-rw-r--r--src/main/java/goodgenerator/blocks/tileEntity/render/TileAntimatter.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/main/java/goodgenerator/blocks/tileEntity/render/TileAntimatter.java b/src/main/java/goodgenerator/blocks/tileEntity/render/TileAntimatter.java
index 80b36ab01b..e1f4fe84cf 100644
--- a/src/main/java/goodgenerator/blocks/tileEntity/render/TileAntimatter.java
+++ b/src/main/java/goodgenerator/blocks/tileEntity/render/TileAntimatter.java
@@ -17,6 +17,7 @@ import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation;
public class TileAntimatter extends TileEntity {
public boolean shouldRender = true;
+ private AxisAlignedBB boundingBox;
// Antimatter Core settings
public static final float spikeR = 0.153f, spikeG = 0.435f, spikeB = 1f;
@@ -85,13 +86,16 @@ public class TileAntimatter extends TileEntity {
@Override
public AxisAlignedBB getRenderBoundingBox() {
- return AxisAlignedBB.getBoundingBox(
- xCoord - maximalRadius - 1,
- yCoord - maximalRadius - 1,
- zCoord - maximalRadius - 1,
- xCoord + maximalRadius + 1,
- yCoord + maximalRadius + 1,
- zCoord + maximalRadius + 1);
+ if (boundingBox == null) {
+ boundingBox = AxisAlignedBB.getBoundingBox(
+ xCoord - maximalRadius - 1,
+ yCoord - maximalRadius - 1,
+ zCoord - maximalRadius - 1,
+ xCoord + maximalRadius + 1,
+ yCoord + maximalRadius + 1,
+ zCoord + maximalRadius + 1);
+ }
+ return boundingBox;
}
@Override