Added a null check in PipeRender
Catches non-existant liquids, but I expect it will still crash elsewhere if the liquid doesn't exist.
This commit is contained in:
parent
dd279689a8
commit
198fa9b7ed
1 changed files with 5 additions and 3 deletions
|
@ -368,7 +368,7 @@ public class RenderPipe extends TileEntitySpecialRenderer {
|
|||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public DisplayLiquidList getListFromBuffer(LiquidStack stack, World world) {
|
||||
private DisplayLiquidList getListFromBuffer(LiquidStack stack, World world) {
|
||||
|
||||
int liquidId = stack.itemID;
|
||||
|
||||
|
@ -377,9 +377,11 @@ public class RenderPipe extends TileEntitySpecialRenderer {
|
|||
|
||||
if (liquidId < Block.blocksList.length && Block.blocksList[liquidId] != null) {
|
||||
ForgeHooksClient.bindTexture(Block.blocksList[liquidId].getTextureFile(), 0);
|
||||
} else {
|
||||
} else if(Item.itemsList[liquidId] != null) {
|
||||
ForgeHooksClient.bindTexture(Item.itemsList[liquidId].getTextureFile(), 0);
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
return getDisplayLiquidLists(liquidId, stack.itemMeta, world);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue