Package mods.railcraft.common.util.misc

Examples of mods.railcraft.common.util.misc.EnumColor.ordinal()


            TileEntity tile = world.getTileEntity(x, y, z);
            if (tile instanceof TilePostEmblem) {
                TilePostEmblem post = (TilePostEmblem) tile;
                EnumColor color = post.getColor();
                if (color != null && BlockPostMetal.textures != null)
                    return BlockPostMetal.textures[color.ordinal()];
            }
        }
        return super.getIcon(world, x, y, z, side);
    }
View Full Code Here


    @Override
    public IIcon getIcon(ItemStack stack, int pass) {
        if (stack.getItemDamage() == EnumPost.EMBLEM.ordinal()) {
            EnumColor color = InvTools.getItemColor(stack);
            if (color != null && BlockPostMetal.textures != null)
                return BlockPostMetal.textures[color.ordinal()];
        }
        return super.getIcon(stack, pass);
    }

    @Override
View Full Code Here

        for (EntityMinecart cart : carts) {
            if (cart instanceof EntityLocomotive) {
                EntityLocomotive loco = (EntityLocomotive) cart;
                ItemStack primary = getFilters().getStackInSlot(0);
                EnumColor pColor = InvTools.getItemColor(primary);
                if (pColor != null && pColor.ordinal() != loco.getPrimaryColor()) {
                    continue;
                }
                ItemStack secondary = getFilters().getStackInSlot(1);
                EnumColor sColor = InvTools.getItemColor(secondary);
                if (sColor != null && sColor.ordinal() != loco.getSecondaryColor()) {
View Full Code Here

                if (pColor != null && pColor.ordinal() != loco.getPrimaryColor()) {
                    continue;
                }
                ItemStack secondary = getFilters().getStackInSlot(1);
                EnumColor sColor = InvTools.getItemColor(secondary);
                if (sColor != null && sColor.ordinal() != loco.getSecondaryColor()) {
                    continue;
                }
                return FULL_POWER;
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.