Search in sources :

Example 1 with EnumFaceType

use of com.bluepowermod.client.render.RendererBlockBase.EnumFaceType in project BluePower by Qmunity.

the class BlockContainerBase method registerBlockIcons.

@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
    textures = new HashMap<String, IIcon>();
    for (EnumFaceType faceType : EnumFaceType.values()) {
        boolean ejecting = false;
        boolean powered = false;
        do {
            do {
                String iconName = getIconName(faceType, ejecting, powered);
                if (!textures.containsKey(iconName)) {
                    textures.put(iconName, iconRegister.registerIcon(iconName));
                }
                powered = !powered;
            } while (powered && IBluePowered.class.isAssignableFrom(getTileEntity()));
            ejecting = !ejecting;
        } while (ejecting && IEjectAnimator.class.isAssignableFrom(getTileEntity()));
    }
}
Also used : IBluePowered(com.bluepowermod.tile.IBluePowered) IIcon(net.minecraft.util.IIcon) EnumFaceType(com.bluepowermod.client.render.RendererBlockBase.EnumFaceType) IEjectAnimator(com.bluepowermod.tile.IEjectAnimator) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

EnumFaceType (com.bluepowermod.client.render.RendererBlockBase.EnumFaceType)1 IBluePowered (com.bluepowermod.tile.IBluePowered)1 IEjectAnimator (com.bluepowermod.tile.IEjectAnimator)1 SideOnly (cpw.mods.fml.relauncher.SideOnly)1 IIcon (net.minecraft.util.IIcon)1