use of com.bluepowermod.tile.IEjectAnimator in project BluePower by Qmunity.
the class BlockContainerBase method getIcon.
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
if (textures == null)
return super.getIcon(world, x, y, z, side);
TileEntity te = get(world, x, y, z);
RendererBlockBase.EnumFaceType faceType = EnumFaceType.SIDE;
boolean powered = false;
boolean ejecting = false;
if (te instanceof IRotatable) {
ForgeDirection rotation = ((IRotatable) te).getFacingDirection();
if (rotation.ordinal() == side)
faceType = EnumFaceType.FRONT;
if (rotation.getOpposite().ordinal() == side)
faceType = EnumFaceType.BACK;
}
if (te instanceof IBluePowered) {
powered = ((IBluePowered) te).isPowered();
}
if (te instanceof IEjectAnimator) {
ejecting = ((IEjectAnimator) te).isEjecting();
}
return getIcon(faceType, ejecting, powered, side, te);
}
Aggregations