Search in sources :

Example 1 with ModelBox

use of net.minecraft.client.model.ModelBox in project SilentGems by SilentChaos512.

the class ArmorModelRenderer method compileDisplayList.

@SideOnly(Side.CLIENT)
protected void compileDisplayList(float scale) {
    this.displayList = GLAllocation.generateDisplayLists(1);
    GlStateManager.glNewList(this.displayList, 4864);
    VertexBuffer vertexBuffer = Tessellator.getInstance().getBuffer();
    for (int i = 0; i < this.cubeList.size(); i++) {
        ((ModelBox) this.cubeList.get(i)).render(vertexBuffer, scale);
    }
    GlStateManager.glEndList();
    this.compiled = true;
}
Also used : VertexBuffer(net.minecraft.client.renderer.VertexBuffer) ModelBox(net.minecraft.client.model.ModelBox) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 2 with ModelBox

use of net.minecraft.client.model.ModelBox in project Galacticraft by micdoodle8.

the class ModelRendererGC method compileDisplayList.

@SideOnly(Side.CLIENT)
private void compileDisplayList(float par1) {
    this.displayList = GLAllocation.generateDisplayLists(1);
    GL11.glNewList(this.displayList, GL11.GL_COMPILE);
    Tessellator tessellator = Tessellator.getInstance();
    for (int i = 0; i < this.cubeList.size(); ++i) {
        ((ModelBox) this.cubeList.get(i)).render(tessellator.getWorldRenderer(), par1);
    }
    GL11.glEndList();
    this.compiled = true;
}
Also used : Tessellator(net.minecraft.client.renderer.Tessellator) ModelBox(net.minecraft.client.model.ModelBox) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 3 with ModelBox

use of net.minecraft.client.model.ModelBox in project GregTech by GregTechCE.

the class ArmorLogicRebreather method getArmorModel.

@SideOnly(Side.CLIENT)
private ModelBiped getArmorModel() {
    if (armorModel == null) {
        this.armorModel = new ModelBiped(1.0f, 0.0f, 32, 32);
        this.armorModel.bipedHeadwear.isHidden = true;
        ModelRenderer bipedHead = this.armorModel.bipedHead;
        bipedHead.cubeList.add(new ModelBox(bipedHead, 0, 16, -2.0F, -6.0F, 4.0f, 4, 4, 4, 0.0f));
    }
    return armorModel;
}
Also used : ModelBiped(net.minecraft.client.model.ModelBiped) ModelRenderer(net.minecraft.client.model.ModelRenderer) ModelBox(net.minecraft.client.model.ModelBox) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 4 with ModelBox

use of net.minecraft.client.model.ModelBox in project Hyperium by HyperiumClient.

the class MixinModelBiped method fixTopAndBottomOfLimbWrongTextures.

/**
 * Fixes boxes having the wrong textures, when they are the second part of a limb
 *
 * @param models The {@link ModelRenderer} parts you want to fix
 */
void fixTopAndBottomOfLimbWrongTextures(ModelRenderer... models) {
    for (ModelRenderer model : models) {
        // We only need the first box since we know there only is one
        ModelBox box = model.cubeList.get(0);
        ((IMixinModelBox) box).offsetTextureQuad(model, 3, 0.0F, -6.0F);
    }
}
Also used : ModelRenderer(net.minecraft.client.model.ModelRenderer) ModelBox(net.minecraft.client.model.ModelBox) IMixinModelBox(cc.hyperium.mixinsimp.client.model.IMixinModelBox) IMixinModelBox(cc.hyperium.mixinsimp.client.model.IMixinModelBox)

Aggregations

ModelBox (net.minecraft.client.model.ModelBox)4 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)3 ModelRenderer (net.minecraft.client.model.ModelRenderer)2 IMixinModelBox (cc.hyperium.mixinsimp.client.model.IMixinModelBox)1 ModelBiped (net.minecraft.client.model.ModelBiped)1 Tessellator (net.minecraft.client.renderer.Tessellator)1 VertexBuffer (net.minecraft.client.renderer.VertexBuffer)1