Search in sources :

Example 1 with TileCPU

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

the class BlockCPU method getIcon.

@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
    TileCPU tile = (TileCPU) 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 : TileCPU(com.bluepowermod.tile.tier3.TileCPU) ForgeDirection(net.minecraftforge.common.util.ForgeDirection) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

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