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().
This commit is contained in:
parent
ffc11cc495
commit
77a3f3ceaf
1 changed files with 2 additions and 5 deletions
|
@ -44,8 +44,6 @@ public class RenderTank extends TileEntitySpecialRenderer {
|
||||||
block.baseBlock = Block.waterStill;
|
block.baseBlock = Block.waterStill;
|
||||||
block.texture = liquid.getRenderingIcon();
|
block.texture = liquid.getRenderingIcon();
|
||||||
|
|
||||||
String spriteSet = liquid.getTextureSheet();
|
|
||||||
|
|
||||||
if (liquid.itemID < Block.blocksList.length && Block.blocksList[liquid.itemID] != null) {
|
if (liquid.itemID < Block.blocksList.length && Block.blocksList[liquid.itemID] != null) {
|
||||||
block.baseBlock = Block.blocksList[liquid.itemID];
|
block.baseBlock = Block.blocksList[liquid.itemID];
|
||||||
}
|
}
|
||||||
|
@ -54,8 +52,6 @@ public class RenderTank extends TileEntitySpecialRenderer {
|
||||||
d[s] = GLAllocation.generateDisplayLists(1);
|
d[s] = GLAllocation.generateDisplayLists(1);
|
||||||
GL11.glNewList(d[s], 4864 /* GL_COMPILE */);
|
GL11.glNewList(d[s], 4864 /* GL_COMPILE */);
|
||||||
|
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(spriteSet);
|
|
||||||
|
|
||||||
block.minX = 0.125 + 0.01;
|
block.minX = 0.125 + 0.01;
|
||||||
block.minY = 0;
|
block.minY = 0;
|
||||||
block.minZ = 0.125 + 0.01;
|
block.minZ = 0.125 + 0.01;
|
||||||
|
@ -92,7 +88,8 @@ public class RenderTank extends TileEntitySpecialRenderer {
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glDisable(2896 /* GL_LIGHTING */);
|
GL11.glDisable(2896 /* GL_LIGHTING */);
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(refLiquid.getTextureSheet());
|
|
||||||
|
bindTextureByName(refLiquid.getTextureSheet());
|
||||||
|
|
||||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue