Java 类net.minecraft.client.model.ModelChest 实例源码

项目:EndermanEvolution    文件:IronChests.java   
@SideOnly(Side.CLIENT)
public static void renderChest(ItemStack stack, float lidAngle) {
    ModelChest modelChest = new ModelChest();
    GlStateManager.color(1, 1, 1, 1);
    RenderUtils.bindTexture(getChestType(stack).modelTexture);
    GlStateManager.pushMatrix();
    GlStateManager.enableRescaleNormal();
    GlStateManager.color(1, 1, 1, 1);
    GlStateManager.translate(0, 1.0, 1.0F);
    GlStateManager.scale(1.0F, -1.0F, -1.0F);
    GlStateManager.translate(0.5F, 0.5F, 0.5F);
    GlStateManager.rotate(2 * 90, 0.0F, 1.0F, 0.0F);
    GlStateManager.translate(-0.5F, -0.5F, -0.5F);
    modelChest.chestLid.rotateAngleX = lidAngle;
    modelChest.renderAll();
    GlStateManager.popMatrix();
}
项目:ComponentEquipment    文件:BackpackRenderer.java   
@Override
public void render( EntityLivingBase entity, ItemStack stack, String modName, float par2, float par3, float par4, float par5, float par6, float par7 )
{
    TextureManager re = Minecraft.getMinecraft().getTextureManager();

    EquipmentItem equipment = ( EquipmentItem ) stack.getItem();
    BackpackModifier mod = ( BackpackModifier ) Modifier.getModifier( modName );

    ClientUtils.bindTexture( mod.getModelTexture( equipment.equipment.getModifierLevel( stack, modName ) ) );
    ModelChest chest = new ModelChest();

    GL11.glScalef( 0.5f, 0.5f, 0.5f );
    GL11.glRotatef( 180, 0, 1, 0 );
    GL11.glTranslatef( -0.5f, 0, -0.75f );
    chest.renderAll();
}
项目:Backmemed    文件:ModelAdapterChest.java   
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelChest))
    {
        return null;
    }
    else
    {
        ModelChest modelchest = (ModelChest)model;
        return modelPart.equals("lid") ? modelchest.chestLid : (modelPart.equals("base") ? modelchest.chestBelow : (modelPart.equals("knob") ? modelchest.chestKnob : null));
    }
}
项目:Backmemed    文件:ModelAdapterChestLarge.java   
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelChest))
    {
        return null;
    }
    else
    {
        ModelChest modelchest = (ModelChest)model;
        return modelPart.equals("lid") ? modelchest.chestLid : (modelPart.equals("base") ? modelchest.chestBelow : (modelPart.equals("knob") ? modelchest.chestKnob : null));
    }
}
项目:Backmemed    文件:ModelAdapterEnderChest.java   
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelChest))
    {
        return null;
    }
    else
    {
        ModelChest modelchest = (ModelChest)model;
        return modelPart.equals("lid") ? modelchest.chestLid : (modelPart.equals("base") ? modelchest.chestBelow : (modelPart.equals("knob") ? modelchest.chestKnob : null));
    }
}
项目:amunra    文件:ModelARChest.java   
public void render(BlockARChest chestBlock, boolean isDouble, double x, double y, double z)
{
    ModelChest chestModel = null;
    //ModelLargeChest largeModel = null;

    if (!isDouble)
    {
        chestModel = this.chestModel;
        Minecraft.getMinecraft().renderEngine.bindTexture(((BlockARChest)chestBlock).getSmallTexture());
    }
    else
    {
        chestModel = this.largeChestModel;
        Minecraft.getMinecraft().renderEngine.bindTexture(((BlockARChest)chestBlock).getLargeTexture());
    }

    GL11.glPushMatrix();
    //GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glTranslatef((float) x, (float) y + 1.0F, (float) z + 1.0F);
    GL11.glScalef(1.0F, -1.0F, -1.0F);
    GL11.glTranslatef(0.5F, 0.5F, 0.5F);
    GL11.glRotated(-90, 0, 1, 0);
    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);


    chestModel.renderAll();


    //GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
项目:PrimalChests    文件:RenderTileEntityPrimalChestAdvanced.java   
public RenderTileEntityPrimalChestAdvanced() {
    this.model = new ModelChest();
    this.random = new Random();
}
项目:PrimalChests    文件:RenderTileEntityPrimalChest.java   
public RenderTileEntityPrimalChest() {
    this.model = new ModelChest();
    this.random = new Random();
}
项目:Backmemed    文件:ModelAdapterChest.java   
public ModelBase makeModel()
{
    return new ModelChest();
}
项目:Backmemed    文件:ModelAdapterEnderChest.java   
public ModelBase makeModel()
{
    return new ModelChest();
}
项目:4Space-5    文件:ItemRendererTier2Rocket.java   
@Override
protected void renderSpaceship(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();

    this.transform(item, type);

    if (item.getItemDamage() < 10)
    {
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.texture);
        this.modelSpaceship.render(this.spaceship, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
        GL11.glPopMatrix();
    }
    else
    {
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(ItemRendererTier2Rocket.cargoRocketTexture);
        this.cargoRocketModel.renderAll();
        GL11.glPopMatrix();
    }

    if (type == ItemRenderType.INVENTORY)
    {
        int index = Math.min(Math.max(item.getItemDamage() >= 10 ? item.getItemDamage() - 10 : item.getItemDamage(), 0), EnumRocketType.values().length - 1);

        if (EnumRocketType.values()[index].getInventorySpace() > 3)
        {
            final ModelChest modelChest = this.chestModel;
            FMLClientHandler.instance().getClient().renderEngine.bindTexture(ItemRendererTier1Rocket.chestTexture);

            GL11.glPushMatrix();
            GL11.glDisable(GL11.GL_DEPTH_TEST);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glScalef(0.5F, -0.5F, -0.5F);
            GL11.glTranslatef(1.5F, 1.95F, 1.7F);
            final short short1 = 0;

            GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-1.5F, -1.5F, -1.5F);
            float f1 = 0;
            f1 = 1.0F - f1;
            f1 = 1.0F - f1 * f1 * f1;
            modelChest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);

            modelChest.chestBelow.render(0.0625F);
            modelChest.chestLid.render(0.0625F);
            modelChest.chestKnob.render(0.0625F);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glPopMatrix();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        }
    }
}
项目:4Space-5    文件:ItemRendererTier3Rocket.java   
protected void renderSpaceship(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();

    this.transform(item, type);

    FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.texture);
    this.modelSpaceship.renderAll();
    GL11.glPopMatrix();

    if (type == ItemRenderType.INVENTORY)
    {
        int index = Math.min(Math.max(item.getItemDamage(), 0), EnumRocketType.values().length - 1);
        if (EnumRocketType.values()[index].getInventorySpace() > 3)
        {
            final ModelChest modelChest = this.chestModel;
            FMLClientHandler.instance().getClient().renderEngine.bindTexture(ItemRendererTier3Rocket.chestTexture);

            GL11.glPushMatrix();
            GL11.glDisable(GL11.GL_DEPTH_TEST);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glScalef(0.5F, -0.5F, -0.5F);
            GL11.glTranslatef(1.5F, 1.95F, 1.7F);
            final short short1 = 0;

            GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-1.5F, -1.5F, -1.5F);
            float f1 = 0;
            f1 = 1.0F - f1;
            f1 = 1.0F - f1 * f1 * f1;
            modelChest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);

            modelChest.chestBelow.render(0.0625F);
            modelChest.chestLid.render(0.0625F);
            modelChest.chestKnob.render(0.0625F);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glPopMatrix();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        }
    }
}
项目:4Space-5    文件:ItemRendererTier1Rocket.java   
protected void renderSpaceship(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();

    this.transform(item, type);

    FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.texture);
    this.modelSpaceship.render(this.spaceship, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
    GL11.glPopMatrix();

    if (type == ItemRenderType.INVENTORY)
    {
        int index = Math.min(Math.max(item.getItemDamage(), 0), EnumRocketType.values().length - 1);
        if (EnumRocketType.values()[index].getInventorySpace() > 3)
        {
            final ModelChest modelChest = this.chestModel;
            FMLClientHandler.instance().getClient().renderEngine.bindTexture(ItemRendererTier1Rocket.chestTexture);

            GL11.glPushMatrix();
            GL11.glDisable(GL11.GL_DEPTH_TEST);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glScalef(0.5F, -0.5F, -0.5F);
            GL11.glTranslatef(1.5F, 1.95F, 1.7F);
            final short short1 = 0;

            GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-1.5F, -1.5F, -1.5F);
            float f1 = 0;
            f1 = 1.0F - f1;
            f1 = 1.0F - f1 * f1 * f1;
            modelChest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);

            modelChest.chestBelow.render(0.0625F);
            modelChest.chestLid.render(0.0625F);
            modelChest.chestKnob.render(0.0625F);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glPopMatrix();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        }
    }
}
项目:Gravestone-mod-Extended    文件:TileEntityHauntedChestRenderer.java   
/**
 * Renders the TileEntity for the chest at a position.
 */
public void renderTileEntityChestAt(TileEntityHauntedChest te, double x, double y, double z, float par8) {
    int metadata = 0;

    if(te == null) {
        te = CHEST_TE;
    }

    GL11.glPushMatrix();
    if (te.hasWorld()) {
        metadata = te.getBlockMetadata();
    } else {
        GL11.glRotatef(45, 0, 1, 0);
        GL11.glScalef(0.6F, 0.6F, 0.6F);
        GL11.glTranslatef((float) x + 0.2F, (float) y + 0.3F, (float) z);
    }


    ModelChest modelchest = this.chestModel;

    if (this.isChristmas) {
        this.bindTexture(Resources.CHRISTMAS_CHEST);
    } else {
        this.bindTexture(Resources.DEFAULT_CHEST);
    }

    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glColor4f(1, 1, 1, 1);
    GL11.glTranslatef((float) x, (float) y + 1, (float) z + 1);
    GL11.glScalef(1, -1, -1);
    GL11.glTranslatef(0.5F, 0.5F, 0.5F);
    float direction = 0;

    switch (metadata) {
        case 2:
            direction = 180;
            break;
        case 3:
            direction = 0;
            break;
        case 4:
            direction = 90;
            break;
        case 5:
            direction = -90;
            break;
    }

    GL11.glRotatef(direction, 0, 1, 0);
    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
    float f1 = te.prevLidAngle + (te.lidAngle - te.prevLidAngle) * par8;

    f1 = 1 - f1;
    f1 = 1 - f1 * f1 * f1;
    modelchest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2F);
    modelchest.renderAll();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
    GL11.glColor4f(1, 1, 1, 1);
}
项目:Toms-Mod    文件:TileEntityLimitableChestRenderer.java   
@Override
public void renderTileEntityAt(TileEntityLimitableChest te, double x, double y, double z, float partialTicks, int destroyStage, IBlockState state) {

    GlStateManager.enableDepth();
    GlStateManager.depthFunc(515);
    GlStateManager.depthMask(true);
    int i;
    if (te == null)
        te = TileEntityLimitableChestRenderer.te;
    if (!te.hasWorld()) {
        i = 0;
    } else {
        i = te.getBlockMetadata();
    }

    ModelChest modelchest;
    modelchest = this.simpleChest;

    if (destroyStage >= 0) {
        this.bindTexture(DESTROY_STAGES[destroyStage]);
        GlStateManager.matrixMode(5890);
        GlStateManager.pushMatrix();
        GlStateManager.scale(4.0F, 4.0F, 1.0F);
        GlStateManager.translate(0.0625F, 0.0625F, 0.0625F);
        GlStateManager.matrixMode(5888);
    }
    this.bindTexture(textureNormal);

    GlStateManager.pushMatrix();
    GlStateManager.enableRescaleNormal();

    if (destroyStage < 0) {
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    }

    GlStateManager.translate((float) x, (float) y + 1.0F, (float) z + 1.0F);
    GlStateManager.scale(1.0F, -1.0F, -1.0F);
    GlStateManager.translate(0.5F, 0.5F, 0.5F);
    int j = 0;

    if (i == 2) {
        j = 180;
    }

    if (i == 3) {
        j = 0;
    }

    if (i == 4) {
        j = 90;
    }

    if (i == 5) {
        j = -90;
    }

    GlStateManager.rotate(j, 0.0F, 1.0F, 0.0F);
    GlStateManager.translate(-0.5F, -0.5F, -0.5F);
    float f = te.prevLidAngle + (te.lidAngle - te.prevLidAngle) * partialTicks;

    f = 1.0F - f;
    f = 1.0F - f * f * f;
    modelchest.chestLid.rotateAngleX = -(f * (float) Math.PI / 2.0F);
    modelchest.renderAll();
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

    if (destroyStage >= 0) {
        GlStateManager.matrixMode(5890);
        GlStateManager.popMatrix();
        GlStateManager.matrixMode(5888);
    }
}
项目:RorysMod    文件:RenderPoweredChest.java   
public RenderPoweredChest() {
    model = new ModelChest();
}
项目:PopularMMOS-EpicProportions-Mod    文件:ItemRenderJenChest.java   
public ItemRenderJenChest() {
    chestModel = new ModelChest();
}
项目:PopularMMOS-EpicProportions-Mod    文件:ItemRenderPatChest.java   
public ItemRenderPatChest() {
    chestModel = new ModelChest();
}
项目:NewHorizonsCoreMod    文件:RenderItemBabyChest.java   
public RenderItemBabyChest() 
{
    _mModelChest = new ModelChest();
}
项目:amunra    文件:ItemRendererShuttle.java   
protected void renderSpaceship(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();

    this.transform(item, type);


    FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.texture);
    this.modelSpaceship.renderAll();
    GL11.glPopMatrix();

    if (type == ItemRenderType.INVENTORY)
    {
        int numChests = EntityShuttle.getNumChestsFromDamage(item.getItemDamage());
        int numTanks  = EntityShuttle.getNumTanksFromDamage(item.getItemDamage());
        //int index = Math.min(Math.max(item.getItemDamage(), 0), EnumRocketType.values().length - 1);
        if (numChests > 0)
        {
            final ModelChest modelChest = this.chestModel;
            FMLClientHandler.instance().getClient().renderEngine.bindTexture(chestTexture);

            GL11.glPushMatrix();
            GL11.glDisable(GL11.GL_DEPTH_TEST);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glScalef(0.5F, -0.5F, -0.5F);
            GL11.glTranslatef(1.5F, 1.95F, 1.7F);
            final short short1 = 0;

            GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-1.5F, -1.5F, -1.5F);
            float f1 = 0;
            f1 = 1.0F - f1;
            f1 = 1.0F - f1 * f1 * f1;
            modelChest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);

            modelChest.chestBelow.render(0.0625F);
            modelChest.chestLid.render(0.0625F);
            modelChest.chestKnob.render(0.0625F);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glPopMatrix();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        }
        if(numTanks > 0) {
            GL11.glPushMatrix();
            FMLClientHandler.instance().getClient().renderEngine.bindTexture(tankTexture);
            final Tessellator tessellator = Tessellator.instance;

            GL11.glTranslatef(1.0F, 0.98F, 1.7F);



            GL11.glDisable(GL11.GL_DEPTH_TEST);

            GL11.glRotatef(45, 0.0F, 1.0F, 0.0F);
            GL11.glRotatef(180, 1.0F, 0.0F, 0.0F);

            if(numChests == 0) {
                GL11.glTranslatef(0.7F, 0.0F, 0.0F);
            }

            //GL11.glScalef(0.5F, 0.5F, 0.5F);
            GL11.glScalef(0.61F, 0.71F, 1.0F);

            tessellator.startDrawingQuads();
            tessellator.addVertexWithUV(0, 1, 0, 0, 1);
            tessellator.addVertexWithUV(1, 1, 0, 1, 1);
            tessellator.addVertexWithUV(1, 0, 0, 1, 0);
            tessellator.addVertexWithUV(0, 0, 0, 0, 0);
            tessellator.draw();

            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glPopMatrix();
        }
    }
}
项目:ExtraCarts-1.7.10    文件:RenderLeadedChestCart.java   
public void doRender(EntityMinecart entityMinecart, double xCoord, double yCoord, double zCoord, float p_76986_8_,
                     float p_76986_9_) {
    GL11.glPushMatrix();
    this.bindEntityTexture(entityMinecart);
    long i = (long)entityMinecart.getEntityId() * 493286711L;
    i = i * i * 4392167121L + i * 98761L;
    float f2 = (((float)(i >> 16 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F;
    float f3 = (((float)(i >> 20 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F;
    float f4 = (((float)(i >> 24 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F;
    GL11.glTranslatef(f2, f3, f4);
    double d3 = entityMinecart.lastTickPosX + (entityMinecart.posX - entityMinecart.lastTickPosX) * (double)p_76986_9_;
    double d4 = entityMinecart.lastTickPosY + (entityMinecart.posY - entityMinecart.lastTickPosY) * (double)p_76986_9_;
    double d5 = entityMinecart.lastTickPosZ + (entityMinecart.posZ - entityMinecart.lastTickPosZ) * (double)p_76986_9_;
    double d6 = 0.30000001192092896D;
    Vec3 vec3 = entityMinecart.func_70489_a(d3, d4, d5);
    float f5 = entityMinecart.prevRotationPitch + (entityMinecart.rotationPitch - entityMinecart.prevRotationPitch) * p_76986_9_;

    if (vec3 != null) {
        Vec3 vec31 = entityMinecart.func_70495_a(d3, d4, d5, d6);
        Vec3 vec32 = entityMinecart.func_70495_a(d3, d4, d5, -d6);

        if (vec31 == null) {
            vec31 = vec3;
        }

        if (vec32 == null) {
            vec32 = vec3;
        }

        xCoord += vec3.xCoord - d3;
        yCoord += (vec31.yCoord + vec32.yCoord) / 2.0D - d4;
        zCoord += vec3.zCoord - d5;
        Vec3 vec33 = vec32.addVector(-vec31.xCoord, -vec31.yCoord, -vec31.zCoord);

        if (vec33.lengthVector() != 0.0D) {
            vec33 = vec33.normalize();
            p_76986_8_ = (float)(Math.atan2(vec33.zCoord, vec33.xCoord) * 180.0D / Math.PI);
            f5 = (float)(Math.atan(vec33.yCoord) * 73.0D);
        }
    }

    GL11.glTranslatef((float)xCoord, (float)yCoord, (float)zCoord);
    GL11.glRotatef(180.0F - p_76986_8_, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(-f5, 0.0F, 0.0F, 1.0F);
    float f7 = (float)entityMinecart.getRollingAmplitude() - p_76986_9_;
    float f8 = entityMinecart.getDamage() - p_76986_9_;

    if (f8 < 0.0F) {
        f8 = 0.0F;
    }

    if (f7 > 0.0F) {
        GL11.glRotatef(MathHelper.sin(f7) * f7 * f8 / 10.0F * (float)entityMinecart.getRollingDirection(), 1.0F, 0.0F, 0.0F);
    }

    int k = entityMinecart.getDisplayTileOffset();

    GL11.glPushMatrix();
    ModelChest modelChest = new ModelChest();
    this.bindTexture(Resources.Model.LEADED_CHEST);
    GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
    GL11.glTranslatef(-0.38F, -0.65F, -0.38F);
    float f6 = 0.75F;
    GL11.glScalef(f6, f6, f6);
    modelChest.chestLid.rotateAngleX = 0;
    modelChest.renderAll();

    GL11.glTranslatef(0.0F, (float) k / 16.0F, 0.0F);

    GL11.glPopMatrix();
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    this.bindEntityTexture(entityMinecart);

    GL11.glScalef(-1.0F, -1.0F, 1.0F);
    this.modelMinecart.render(entityMinecart, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
    GL11.glPopMatrix();
}
项目:RidiculousWorld    文件:RenderItemChest.java   
public RenderItemChest()
{
    modelChest = new ModelChest();
}
项目:SpawnChests    文件:ItemRenderSpawnChest.java   
public ItemRenderSpawnChest()
{
    this.model = new ModelChest();
}
项目:4-Space-Legacy    文件:SCJupiterItemRendererSpaceshipT5.java   
@Override
protected void renderSpaceship(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();

    this.transform(item, type);

    if (item.getItemDamage() < 10)
    {
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.texture);
        this.modelSpaceship.render(this.spaceship, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
        GL11.glPopMatrix();
    }
    else
    {
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(SCJupiterItemRendererSpaceshipT5.cargoRocketTexture);
        this.cargoRocketModel.renderAll();
        GL11.glPopMatrix();
    }

    if (type == ItemRenderType.INVENTORY)
    {
        int index = Math.min(Math.max(item.getItemDamage() >= 10 ? item.getItemDamage() - 10 : item.getItemDamage(), 0), EnumRocketType.values().length - 1);

        if (EnumRocketType.values()[index].getInventorySpace() > 3)
        {
            final ModelChest modelChest = this.chestModel;
            FMLClientHandler.instance().getClient().renderEngine.bindTexture(GCCoreItemRendererSpaceship.chestTexture);

            GL11.glPushMatrix();
            GL11.glDisable(GL11.GL_DEPTH_TEST);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glScalef(0.5F, -0.5F, -0.5F);
            GL11.glTranslatef(1.5F, 1.95F, 1.7F);
            final short short1 = 0;

            GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-1.5F, -1.5F, -1.5F);
            float f1 = 0;
            f1 = 1.0F - f1;
            f1 = 1.0F - f1 * f1 * f1;
            modelChest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);

            modelChest.chestBelow.render(0.0625F);
            modelChest.chestLid.render(0.0625F);
            modelChest.chestKnob.render(0.0625F);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glPopMatrix();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        }
    }
}
项目:4-Space-Legacy    文件:SCMercuryItemRendererSpaceshipT4.java   
@Override
protected void renderSpaceship(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();

    this.transform(item, type);

    if (item.getItemDamage() < 10)
    {
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.texture);
        this.modelSpaceship.render(this.spaceship, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
        GL11.glPopMatrix();
    }
    else
    {
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(SCMercuryItemRendererSpaceshipT4.cargoRocketTexture);
        this.cargoRocketModel.renderAll();
        GL11.glPopMatrix();
    }

    if (type == ItemRenderType.INVENTORY)
    {
        int index = Math.min(Math.max(item.getItemDamage() >= 10 ? item.getItemDamage() - 10 : item.getItemDamage(), 0), EnumRocketType.values().length - 1);

        if (EnumRocketType.values()[index].getInventorySpace() > 3)
        {
            final ModelChest modelChest = this.chestModel;
            FMLClientHandler.instance().getClient().renderEngine.bindTexture(GCCoreItemRendererSpaceship.chestTexture);

            GL11.glPushMatrix();
            GL11.glDisable(GL11.GL_DEPTH_TEST);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glScalef(0.5F, -0.5F, -0.5F);
            GL11.glTranslatef(1.5F, 1.95F, 1.7F);
            final short short1 = 0;

            GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-1.5F, -1.5F, -1.5F);
            float f1 = 0;
            f1 = 1.0F - f1;
            f1 = 1.0F - f1 * f1 * f1;
            modelChest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);

            modelChest.chestBelow.render(0.0625F);
            modelChest.chestLid.render(0.0625F);
            modelChest.chestKnob.render(0.0625F);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glPopMatrix();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        }
    }
}
项目:4-Space-Legacy    文件:SCVenusItemRendererSpaceshipT3.java   
@Override
protected void renderSpaceship(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();

    this.transform(item, type);

    if (item.getItemDamage() < 10)
    {
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.texture);
        this.modelSpaceship.render(this.spaceship, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
        GL11.glPopMatrix();
    }
    else
    {
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(SCVenusItemRendererSpaceshipT3.cargoRocketTexture);
        this.cargoRocketModel.renderAll();
        GL11.glPopMatrix();
    }

    if (type == ItemRenderType.INVENTORY)
    {
        int index = Math.min(Math.max(item.getItemDamage() >= 10 ? item.getItemDamage() - 10 : item.getItemDamage(), 0), EnumRocketType.values().length - 1);

        if (EnumRocketType.values()[index].getInventorySpace() > 3)
        {
            final ModelChest modelChest = this.chestModel;
            FMLClientHandler.instance().getClient().renderEngine.bindTexture(GCCoreItemRendererSpaceship.chestTexture);

            GL11.glPushMatrix();
            GL11.glDisable(GL11.GL_DEPTH_TEST);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glScalef(0.5F, -0.5F, -0.5F);
            GL11.glTranslatef(1.5F, 1.95F, 1.7F);
            final short short1 = 0;

            GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-1.5F, -1.5F, -1.5F);
            float f1 = 0;
            f1 = 1.0F - f1;
            f1 = 1.0F - f1 * f1 * f1;
            modelChest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);

            modelChest.chestBelow.render(0.0625F);
            modelChest.chestLid.render(0.0625F);
            modelChest.chestKnob.render(0.0625F);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glPopMatrix();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        }
    }
}
项目:4-Space-Legacy    文件:SCSednaItemRendererSpaceshipT6.java   
@Override
protected void renderSpaceship(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();

    this.transform(item, type);

    if (item.getItemDamage() < 10)
    {
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.texture);
        this.modelSpaceship.render(this.spaceship, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
        GL11.glPopMatrix();
    }
    else
    {
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(SCSednaItemRendererSpaceshipT6.cargoRocketTexture);
        this.cargoRocketModel.renderAll();
        GL11.glPopMatrix();
    }

    if (type == ItemRenderType.INVENTORY)
    {
        int index = Math.min(Math.max(item.getItemDamage() >= 10 ? item.getItemDamage() - 10 : item.getItemDamage(), 0), EnumRocketType.values().length - 1);

        if (EnumRocketType.values()[index].getInventorySpace() > 3)
        {
            final ModelChest modelChest = this.chestModel;
            FMLClientHandler.instance().getClient().renderEngine.bindTexture(GCCoreItemRendererSpaceship.chestTexture);

            GL11.glPushMatrix();
            GL11.glDisable(GL11.GL_DEPTH_TEST);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glScalef(0.5F, -0.5F, -0.5F);
            GL11.glTranslatef(1.5F, 1.95F, 1.7F);
            final short short1 = 0;

            GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-1.5F, -1.5F, -1.5F);
            float f1 = 0;
            f1 = 1.0F - f1;
            f1 = 1.0F - f1 * f1 * f1;
            modelChest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);

            modelChest.chestBelow.render(0.0625F);
            modelChest.chestLid.render(0.0625F);
            modelChest.chestKnob.render(0.0625F);
            GL11.glEnable(GL11.GL_DEPTH_TEST);
            GL11.glPopMatrix();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        }
    }
}
项目:RefinedRelocation    文件:ItemRendererSortingIronChest.java   
public ItemRendererSortingIronChest()
{
    model = new ModelChest();
}
项目:RefinedRelocation    文件:ItemRendererSortingAlchemicalChest.java   
public ItemRendererSortingAlchemicalChest()
{
    super();
    modelChest = new ModelChest();
}
项目:RefinedRelocation    文件:ItemRendererSortingChest.java   
public ItemRendererSortingChest()
{
    model = new ModelChest();
}
项目:RefinedRelocation    文件:RendererSortingChest.java   
/**
 * Renders the TileEntity for the chest at a position.
 */
public void renderTileEntityChestAt(TileSortingChest par1TileEntityChest, double par2, double par4, double par6, float par8)
{
    int i;

    if (!par1TileEntityChest.hasWorldObj())
    {
        i = 0;
    }
    else
    {
        i = par1TileEntityChest.getFacing();
    }

    ModelChest modelchest = this.chestModel;

    if (MinecraftForgeClient.getRenderPass() == 0)
    {
        bindTexture(RES_NORMAL_SINGLE);
    }
    else
    {
        bindTexture(Resources.MODEL_TEXTURE_OVERLAY_CHEST);
    }

    GL11.glPushMatrix();
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glTranslatef((float) par2, (float) par4 + 1.0F, (float) par6 + 1.0F);
    GL11.glScalef(1.0F, -1.0F, -1.0F);
    GL11.glTranslatef(0.5F, 0.5F, 0.5F);
    short short1 = 0;

    if (i == 2)
    {
        short1 = 180;
    }

    if (i == 3)
    {
        short1 = 0;
    }

    if (i == 4)
    {
        short1 = 90;
    }

    if (i == 5)
    {
        short1 = -90;
    }

    GL11.glRotatef((float) short1, 0.0F, 1.0F, 0.0F);
    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
    float f1 = par1TileEntityChest.prevLidAngle + (par1TileEntityChest.lidAngle - par1TileEntityChest.prevLidAngle) * par8;

    f1 = 1.0F - f1;
    f1 = 1.0F - f1 * f1 * f1;
    modelchest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);
    modelchest.renderAll();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
项目:TravelingChest    文件:TETravelingChestRenderer.java   
/**
 * Renders the TileEntity for the chest at a position.
 */
public void renderTETravelingChestAt(TETravelingChest par1TileEntityChest,
        double par2, double par4, double par6, float par8) {
    int i;

    if (!par1TileEntityChest.hasWorldObj()) {
        i = 0;
    } else {
        i = par1TileEntityChest.getBlockMetadata();
    }

    ModelChest modelchest;
    modelchest = this.chestModel;
    this.bindTexture(texture);

    GL11.glPushMatrix();
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glTranslatef((float) par2, (float) par4 + 1.0F,
            (float) par6 + 1.0F);
    GL11.glScalef(1.0F, -1.0F, -1.0F);
    GL11.glTranslatef(0.5F, 0.5F, 0.5F);
    short short1 = 0;

    if (i == 2) {
        short1 = 180;
    }

    if (i == 3) {
        short1 = 0;
    }

    if (i == 4) {
        short1 = 90;
    }

    if (i == 5) {
        short1 = -90;
    }

    GL11.glRotatef(short1, 0.0F, 1.0F, 0.0F);
    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
    float f1 = par1TileEntityChest.prevLidAngle
            + (par1TileEntityChest.lidAngle - par1TileEntityChest.prevLidAngle)
            * par8;

    f1 = 1.0F - f1;
    f1 = 1.0F - f1 * f1 * f1;
    modelchest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F);
    modelchest.renderAll();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
项目:SecurityCraft    文件:ItemKeypadChestRenderer.java   
public ItemKeypadChestRenderer(){

    chestModel = new ModelChest();

}
项目:SecurityCraft    文件:ItemKeypadChestRenderer.java   
public ItemKeypadChestRenderer(){

        chestModel = new ModelChest();

    }
项目:MysticalWonders    文件:ItemRenderMysticalChest.java   
public ItemRenderMysticalChest(){
    chestModel = new ModelChest();

}