/*
 * Copyright 2014 Lukas Tenbrink
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package ivorius.ivtoolkit.items;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.model.IModelCustom;
import org.lwjgl.opengl.GL11;

/**
 * Created by lukas on 12.11.14.
 */
public class IvItemRendererModelCustom implements IItemRenderer
{
    public ItemModelRenderer model;
    public ResourceLocation texture;
    public float modelSize;
    public float[] translation;
    public float[] rotation;

    public IvItemRendererModelCustom(ItemModelRenderer model, ResourceLocation texture, float modelSize, float[] translation, float[] rotation)
    {
        this.model = model;
        this.texture = texture;
        this.modelSize = modelSize;
        this.translation = translation;
        this.rotation = rotation;
    }

    @Override
    public boolean handleRenderType(ItemStack item, IItemRenderer.ItemRenderType type)
    {
        return true;
    }

    @Override
    public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper)
    {
        return true;
    }

    @Override
    public void renderItem(IItemRenderer.ItemRenderType type, ItemStack item, Object... data)
    {
        GL11.glPushMatrix();

        if (type == IItemRenderer.ItemRenderType.ENTITY)
            GL11.glTranslated(0.0, 1.0, 0.0);
        else if (type == IItemRenderer.ItemRenderType.INVENTORY)
            GL11.glTranslated(0.0, 0.3, 0.0);
        else
            GL11.glTranslated(0.5, 1.0, 0.5);

        GL11.glTranslatef(translation[0], translation[1] + 1.0f, translation[2]);

        if (type != IItemRenderer.ItemRenderType.ENTITY)
        {
            float modelScale = 1.0f / modelSize;
            GL11.glScalef(modelScale, modelScale, modelScale);
        }

        GL11.glRotatef(rotation[0], 1.0f, 0.0f, 0.0f);
        GL11.glRotatef(rotation[1], 0.0f, 1.0f, 0.0f);
        GL11.glRotatef(rotation[2], 0.0f, 0.0f, 1.0f);

        GL11.glEnable(GL11.GL_BLEND);
        OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);

        Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
        model.render(item);

        GL11.glPopMatrix();
    }

    public static interface ItemModelRenderer
    {
        void render(ItemStack stack);
    }

    public static class ItemModelRendererSimple implements ItemModelRenderer
    {
        public IModelCustom model;

        public ItemModelRendererSimple(IModelCustom model)
        {
            this.model = model;
        }

        @Override
        public void render(ItemStack stack)
        {
            model.renderAll();
        }
    }
}

@@ -3205,220 +3205,1107 @@
     
-public IModelCustom model;%0A%0A        public ItemModelRendererSimple(IModelCustom model)%0A        %7B%0A            this.model = model;%0A        %7D%0A%0A        @Override%0A        public void render(ItemStack stack)%0A        %7B%0A
+/**%0A         * The model to be rendered.%0A         */%0A        public IModelCustom model;%0A%0A        /**%0A         * The list of render parts for reference. If null, the model will render all parts, otherwise %7B@link #additive%7D will be used.%0A         */%0A        public String%5B%5D renderParts;%0A%0A        /**%0A         * Indicates if the %7B@link #renderParts%7D are additive (true) or subtractive (false).%0A         */%0A        public boolean additive;%0A%0A        public ItemModelRendererSimple(IModelCustom model)%0A        %7B%0A            this.model = model;%0A        %7D%0A%0A        public ItemModelRendererSimple(IModelCustom model, String%5B%5D renderParts, boolean additive)%0A        %7B%0A            this.model = model;%0A            this.renderParts = renderParts;%0A            this.additive = additive;%0A        %7D%0A%0A        @Override%0A        public void render(ItemStack stack)%0A        %7B%0A            if (renderParts != null)%0A            %7B%0A                if (additive)%0A                    model.renderOnly(renderParts);%0A                else%0A                    model.renderAllExcept(renderParts);%0A            %7D%0A            else%0A    
     

Make ItemModelRendererSimple able to render partial models.