Search in sources :

Example 1 with TileMonitor

use of com.bluepowermod.tile.tier3.TileMonitor in project BluePower by Qmunity.

the class BlockMonitor method getIcon.

@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
    TileMonitor tile = (TileMonitor) world.getTileEntity(x, y, z);
    ForgeDirection dir = tile.getFacingDirection();
    if (dir.ordinal() == side) {
        return frontTexture;
    } else if (dir.getOpposite().ordinal() == side) {
        return backTexture;
    } else if (ForgeDirection.UP.ordinal() == side) {
        return topTexture;
    } else if (ForgeDirection.DOWN.ordinal() == side) {
        return bottomTexture;
    } else {
        return sideTexture;
    }
}
Also used : TileMonitor(com.bluepowermod.tile.tier3.TileMonitor) ForgeDirection(net.minecraftforge.common.util.ForgeDirection) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

TileMonitor (com.bluepowermod.tile.tier3.TileMonitor)1 SideOnly (cpw.mods.fml.relauncher.SideOnly)1 ForgeDirection (net.minecraftforge.common.util.ForgeDirection)1