From 77a3f3ceaf4a8621b14c5b6fb71ccc88f4e82cd1 Mon Sep 17 00:00:00 2001 From: CovertJaguar Date: Sun, 14 Apr 2013 02:14:28 -0700 Subject: [PATCH] Fixed bad texture bind Binding textures by directly accessing the render engine seems to cause random effects. One instance I encountered when using that method was texture binds would fail for other TESRs that used bindTextureByName(). --- common/buildcraft/factory/render/RenderTank.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common/buildcraft/factory/render/RenderTank.java b/common/buildcraft/factory/render/RenderTank.java index 212c232d..f97e7bb4 100644 --- a/common/buildcraft/factory/render/RenderTank.java +++ b/common/buildcraft/factory/render/RenderTank.java @@ -44,8 +44,6 @@ public class RenderTank extends TileEntitySpecialRenderer { block.baseBlock = Block.waterStill; block.texture = liquid.getRenderingIcon(); - String spriteSet = liquid.getTextureSheet(); - if (liquid.itemID < Block.blocksList.length && Block.blocksList[liquid.itemID] != null) { block.baseBlock = Block.blocksList[liquid.itemID]; } @@ -54,8 +52,6 @@ public class RenderTank extends TileEntitySpecialRenderer { d[s] = GLAllocation.generateDisplayLists(1); GL11.glNewList(d[s], 4864 /* GL_COMPILE */); - Minecraft.getMinecraft().renderEngine.bindTexture(spriteSet); - block.minX = 0.125 + 0.01; block.minY = 0; block.minZ = 0.125 + 0.01; @@ -92,7 +88,8 @@ public class RenderTank extends TileEntitySpecialRenderer { GL11.glPushMatrix(); GL11.glDisable(2896 /* GL_LIGHTING */); - Minecraft.getMinecraft().renderEngine.bindTexture(refLiquid.getTextureSheet()); + + bindTextureByName(refLiquid.getTextureSheet()); GL11.glTranslatef((float) x, (float) y, (float) z);