From 5d963805d8a8e2ab053e5a50e4ef36b8b73d5a5d Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 9 Jul 2015 18:10:32 +0200 Subject: [PATCH] Stopped the ResourceLocation being created on RenderTick --- .../actuallyadditions/blocks/render/RenderTileEntity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderTileEntity.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderTileEntity.java index 0a86843e9..0edd66073 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderTileEntity.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderTileEntity.java @@ -9,9 +9,11 @@ import org.lwjgl.opengl.GL11; public class RenderTileEntity extends TileEntitySpecialRenderer{ public ModelBaseAA theModel; + private ResourceLocation resLoc; public RenderTileEntity(ModelBaseAA model){ this.theModel = model; + this.resLoc = new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/models/" + this.theModel.getName() + ".png"); } @Override @@ -20,7 +22,7 @@ public class RenderTileEntity extends TileEntitySpecialRenderer{ GL11.glTranslatef((float)x + 0.5F, (float)y - 0.5F, (float)z + 0.5F); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0.0F, -2.0F, 0.0F); - this.bindTexture(new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/models/" + this.theModel.getName() + ".png")); + this.bindTexture(resLoc); if(theModel.doesRotate()){ int meta = tile.getWorldObj().getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord);