End tank rendering if contained liquid does not exist. Closes #227
This commit is contained in:
parent
585095b0c2
commit
30aef0704c
1 changed files with 5 additions and 1 deletions
|
@ -44,8 +44,10 @@ public class RenderTank extends TileEntitySpecialRenderer {
|
|||
BlockInterface block = new BlockInterface();
|
||||
if (liquidId < Block.blocksList.length && Block.blocksList[liquidId] != null)
|
||||
block.texture = Block.blocksList[liquidId].blockIndexInTexture;
|
||||
else
|
||||
else if(Item.itemsList[liquidId] != null)
|
||||
block.texture = Item.itemsList[liquidId].getIconFromDamage(damage);
|
||||
else
|
||||
return null;
|
||||
|
||||
for (int s = 0; s < displayStages; ++s) {
|
||||
d[s] = GLAllocation.generateDisplayLists(1);
|
||||
|
@ -79,6 +81,8 @@ public class RenderTank extends TileEntitySpecialRenderer {
|
|||
return;
|
||||
|
||||
int[] displayList = getDisplayLists(liquid.itemID, liquid.itemMeta, tileentity.worldObj);
|
||||
if(displayList == null)
|
||||
return;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(2896 /* GL_LIGHTING */);
|
||||
|
|
Loading…
Reference in a new issue