Package mods.railcraft.api.carts.locomotive

Examples of mods.railcraft.api.carts.locomotive.LocomotiveModelRenderer


    @Override
    public boolean handleRenderType(ItemStack stack, ItemRenderType type) {
        switch (type) {
            case INVENTORY:
                String rendererTag = ItemLocomotive.getModel(stack);
                LocomotiveModelRenderer renderer = renderType.getRenderer(rendererTag);
                if (renderer == null || !renderer.renderItemIn3D())
                    return false;
            case ENTITY:
            case EQUIPPED:
            case EQUIPPED_FIRST_PERSON:
                return true;
View Full Code Here


    @Override
    @SideOnly(Side.CLIENT)
    public IIcon getIcon(ItemStack stack, int pass) {
        String rendererTag = getModel(stack);
        LocomotiveModelRenderer renderer = renderType.getRenderer(rendererTag);
        if (renderer == null)
            return RenderTools.getMissingIcon();
        IIcon[] icons = renderer.getItemIcons();
        if (pass >= icons.length || icons[pass] == null)
            return blankIcon;
        return renderer.getItemIcons()[pass];
    }
View Full Code Here

            String format = LocalizationPlugin.translate("railcraft.gui.locomotive.tip.item.owner");
            info.add(String.format(format, owner.getName()));
        }

        String model = getModel(stack);
        LocomotiveModelRenderer renderer = renderType.getRenderer(model);
        String modelName;
        if (renderer != null)
            modelName = renderer.getDisplayName();
        else
            modelName = LocalizationPlugin.translate("railcraft.gui.locomotive.tip.item.model.default");
        String format = LocalizationPlugin.translate("railcraft.gui.locomotive.tip.item.model");
        info.add(String.format(format, modelName));
View Full Code Here

TOP

Related Classes of mods.railcraft.api.carts.locomotive.LocomotiveModelRenderer

Copyright © 2018 www.massapicom. 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.