Package cpw.mods.ironchest

Examples of cpw.mods.ironchest.IronChestType


    public void render(TileEntityIronChest tile, double x, double y, double z, float partialTick) {
        if (tile == null) {
            return;
        }
        int facing = 3;
        IronChestType type = tile.getType();
        if (tile != null && tile.hasWorldObj()) {
            facing = tile.getFacing();
            type = tile.getType();
            int typ = tile.getWorldObj().getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord);
            type = IronChestType.values()[typ];
        }
        bindTexture(locations.get(type));
        glPushMatrix();
        glEnable(32826 /* GL_RESCALE_NORMAL_EXT */);
        glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        glTranslatef((float) x, (float) y + 1.0F, (float) z + 1.0F);
        glScalef(1.0F, -1F, -1F);
        glTranslatef(0.5F, 0.5F, 0.5F);
        int k = 0;
        if (facing == 2) {
            k = 180;
        }
        if (facing == 3) {
            k = 0;
        }
        if (facing == 4) {
            k = 90;
        }
        if (facing == 5) {
            k = -90;
        }
        glRotatef(k, 0.0F, 1.0F, 0.0F);
        glTranslatef(-0.5F, -0.5F, -0.5F);
        float lidangle = tile.prevLidAngle + (tile.lidAngle - tile.prevLidAngle) * partialTick;
        lidangle = 1.0F - lidangle;
        lidangle = 1.0F - lidangle * lidangle * lidangle;
        model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F);
        // Render the chest itself
        model.renderAll();
        glDisable(32826 /* GL_RESCALE_NORMAL_EXT */);
        glPopMatrix();
        glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        if (type.isTransparent() && tile.getDistanceFrom(this.field_147501_a.field_147560_j, this.field_147501_a.field_147561_k, this.field_147501_a.field_147558_l) < 128d) {
            random.setSeed(254L);
            float shiftX;
            float shiftY;
            float shiftZ;
            int shift = 0;
View Full Code Here

TOP

Related Classes of cpw.mods.ironchest.IronChestType

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.