Fixed a possible NPE in the cable rendering logic.

This commit is contained in:
AlgorithmX2
2014-07-02 00:05:46 -05:00
parent 1d687f3084
commit a0c15025b7
5 changed files with 65 additions and 55 deletions
+10 -3
View File
@@ -34,9 +34,9 @@ public class BusRenderHelper implements IPartRenderHelper
AEBaseBlock blk = (AEBaseBlock) AEApi.instance().blocks().blockMultiPart.block();
BaseBlockRender bbr = new BaseBlockRender();
public ForgeDirection ax;
public ForgeDirection ay;
public ForgeDirection az;
private ForgeDirection ax = ForgeDirection.EAST;
private ForgeDirection ay = ForgeDirection.UP;
private ForgeDirection az = ForgeDirection.SOUTH;
int color = 0xffffff;
@@ -457,4 +457,11 @@ public class BusRenderHelper implements IPartRenderHelper
return az;
}
public void setOrientation(ForgeDirection dx, ForgeDirection dy, ForgeDirection dz)
{
ax = dx == null ? ForgeDirection.EAST : dx;
ay = dy == null ? ForgeDirection.UP : dy;
az = dz == null ? ForgeDirection.SOUTH : dz;
}
}