Example usage for org.lwjgl.opengl GL11 glRotatef

List of usage examples for org.lwjgl.opengl GL11 glRotatef

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL11 glRotatef.

Prototype

public static native void glRotatef(@NativeType("GLfloat") float angle, @NativeType("GLfloat") float x,
        @NativeType("GLfloat") float y, @NativeType("GLfloat") float z);

Source Link

Document

Manipulates the current matrix with a rotation matrix.

Usage

From source file:fr.mcnanotech.kevin_68.nanotechmod.city.client.renderer.tileentity.TileEntitySunShadeRender.java

License:Creative Commons License

public void renderTileEntityAtBlockLamp(TileEntitySunShade tileentity, double x, double y, double z,
        float scale) {
    GL11.glPushMatrix();/*  w  ww .j  a  va 2  s.  c  o  m*/
    GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
    this.bindTexture(new ResourceLocation("nanotechmodcity",
            "textures/blocks/BlockSunShade" + (tileentity.getIsOpen() ? "Open" : "Close") + ".png"));
    GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
    this.model.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
    GL11.glPopMatrix();
}

From source file:fr.mcnanotech.kevin_68.nanotechmod.city.client.renderer.tileentity.TileEntityTextSpotLightRender.java

License:Creative Commons License

public void renderTileEntitySignAt(TileEntityTextSpotLight tileentity, double par2, double par4, double par6,
        float par8) {
    float f = tileentity.isActiveFloat();
    if (f > 0.0F) {
        GL11.glPushMatrix();//from   w ww  .  j a  va 2 s . c o  m
        float f1 = 0.6666667F;
        float f2 = 0.0F;

        float d2 = (float) tileentity.getWorldObj().getTotalWorldTime() + par8;
        byte b1 = 1;
        double d3 = (double) d2 * 0.025D * (1.0D - (double) (b1 & 1) * 2.5D);
        int i1 = (tileentity.get(TileEntityTextSpotLight.REVERSEROTATION) == 1 ? -1 : 1);

        GL11.glTranslatef((float) par2 + 0.5F, (float) par4 + 0.75F * f1, (float) par6 + 0.5F);
        GL11.glRotatef(-f2, 0.0F, 1.0F, 0.0F);
        GL11.glTranslatef(0.0F, -0.4F, 0.0F);
        GL11.glScaled(0.9D, 0.9D, 0.9D);
        if (tileentity.get(TileEntityTextSpotLight.ROTATE) == 0) {
            GL11.glRotated(d3 * 5 * tileentity.get(TileEntityTextSpotLight.ROTATIONSPEED) * i1, 0.0F, 1.0F,
                    0.0F);
        } else {
            GL11.glRotatef(tileentity.get(TileEntityTextSpotLight.ANGLE), 0.0F, 1.0F, 0.0F);
        }
        this.modelSign.signStick.showModel = false;

        this.bindTexture(field_110638_a);
        GL11.glPushMatrix();
        GL11.glScalef(f1, -f1, -f1);
        this.modelSign.renderSign();
        GL11.glPopMatrix();
        FontRenderer fontrenderer = this.func_147498_b();
        f2 = 0.016666668F * f1;
        GL11.glTranslatef(0.0F, 0.5F * f1, 0.07F * f1);
        GL11.glScalef(f2 * 5, -f2 * 5, f2 * 5);
        GL11.glNormal3f(0.0F, 0.0F, -1.0F * f2);
        GL11.glDepthMask(false);

        GL11.glTranslated(0.0F, -tileentity.get(TileEntityTextSpotLight.HEIGHT), 0.0F);
        // GL11.glTranslated(0.0F, tileentity.getScale() / 5.0F, 0.0F);
        GL11.glScaled(1.0 + (1.0 * (tileentity.get(TileEntityTextSpotLight.SCALE) / 10)),
                1.0 + (1.0 * (tileentity.get(TileEntityTextSpotLight.SCALE) / 10)),
                1.0 + (1.0 * (tileentity.get(TileEntityTextSpotLight.SCALE) / 10)));

        String s = tileentity.signText;
        fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, -20,
                (tileentity.get(TileEntityTextSpotLight.RED) * 65536)
                        + (tileentity.get(TileEntityTextSpotLight.GREEN) * 256)
                        + tileentity.get(TileEntityTextSpotLight.BLUE));
        // GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
        // fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2,
        // -20, (tileentity.getRedValue() * 65536) +
        // (tileentity.getGreenValue() * 256) + tileentity.getBlueValue());

        GL11.glDepthMask(true);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glPopMatrix();
    }
}

From source file:fr.mcnanotech.kevin_68.nanotechmod.city.client.renderer.tileentity.TileEntityTrailRenderTESR.java

License:Creative Commons License

public void renderTileEntityAtBlockTrail(TileEntityTrail tileentity, double x, double y, double z,
        float scale) {
    GL11.glPushMatrix();/*from  w  w w  .j a  va  2  s  .  c  om*/
    GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);

    boolean[] flag = CTHelper.get(tileentity.getWorldObj(), tileentity.xCoord, tileentity.yCoord,
            tileentity.zCoord, NanotechCityBlock.trail);

    if ((flag[CTHelper.VrN] || flag[CTHelper.SrN] || flag[CTHelper.tErN] || flag[CTHelper.tWrN]
            || flag[CTHelper.tEWrN] || flag[CTHelper.tSEWrN] || flag[CTHelper.tNSEWrN])
            && !flag[CTHelper.SEWrN]) {
        GL11.glScalef(1.0F, 0.99F, 0.999F);
        GL11.glTranslatef(0.0F, -0.015F, 0.004F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 0);
    } else if ((flag[CTHelper.VrS] || flag[CTHelper.NrS] || flag[CTHelper.tErS] || flag[CTHelper.tWrS]
            || flag[CTHelper.tEWrS] || flag[CTHelper.tNEWrS] || flag[CTHelper.tNSEWrS])
            && !flag[CTHelper.NEWrS]) {
        GL11.glScalef(1.0F, 0.99F, 0.999F);
        GL11.glTranslatef(0.0F, -0.015F, -0.0048F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 0);
    }

    else if ((flag[CTHelper.VrE] || flag[CTHelper.WrE] || flag[CTHelper.tNrE] || flag[CTHelper.tSrE]
            || flag[CTHelper.tNSrE] || flag[CTHelper.tNSWrE] || flag[CTHelper.tNSEWrE])
            && !flag[CTHelper.NSWrE]) {
        GL11.glScalef(0.999F, 0.99F, 1.0F);
        GL11.glTranslatef(-0.004F, -0.015F, 0.0F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 0);
    }

    else if ((flag[CTHelper.VrW] || flag[CTHelper.ErW] || flag[CTHelper.tNrW] || flag[CTHelper.tSrW]
            || flag[CTHelper.tNSrW] || flag[CTHelper.tNSErW] || flag[CTHelper.tNSEWrW])
            && !flag[CTHelper.NSErW]) {
        GL11.glScalef(0.999F, 0.99F, 1.0F);
        GL11.glTranslatef(0.004F, -0.015F, 0.0F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 0);
    } else if (flag[CTHelper.VrNS] || flag[CTHelper.EWrNS]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.00F);
        this.bindTexture(texture3);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 1);
    } else if (flag[CTHelper.VrEW] || flag[CTHelper.NSrEW]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.00F);
        this.bindTexture(texture3);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 1);
    } else if (flag[CTHelper.VrNE] || flag[CTHelper.tSrNE] || flag[CTHelper.tWrNE]
            || flag[CTHelper.SWswrNEnenwse]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(-0.0045F, -0.015F, 0.0045F);
        this.bindTexture(texture5);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 4);
    } else if (flag[CTHelper.VrNW] || flag[CTHelper.tSrNW] || flag[CTHelper.tErNW]
            || flag[CTHelper.SEserNWnenwsw]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0046F, -0.015F, 0.0046F);
        this.bindTexture(texture5);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 4);
    } else if (flag[CTHelper.VrSE] || flag[CTHelper.tNrSE] || flag[CTHelper.tWrSE]
            || flag[CTHelper.NWnwrSEnesesw]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(-0.0046F, -0.015F, -0.0046F);
        this.bindTexture(texture5);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 4);
    } else if (flag[CTHelper.VrSW] || flag[CTHelper.tNrSW] || flag[CTHelper.tErSW]
            || flag[CTHelper.NEnerSWnwsesw]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0046F, -0.015F, -0.0046F);
        this.bindTexture(texture5);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 4);
    } else if (flag[CTHelper.VrNSE] || flag[CTHelper.WrNSE]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.0F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 6);
    } else if (flag[CTHelper.VrNSW] || flag[CTHelper.ErNSW]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.0F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 6);
    } else if (flag[CTHelper.VrNEW] || flag[CTHelper.SrNEW]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.0F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 6);
    } else if (flag[CTHelper.VrSEW] || flag[CTHelper.NrSEW]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.0F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 6);
    } else if (flag[CTHelper.VrNSEW]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.0F);
        this.bindTexture(texture6);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 5);
    } else if (flag[CTHelper.tNErne]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(-0.0048F, -0.015F, 0.0048F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 2);
        this.bindTexture(texture4);
        this.model2.render(0.0625F, 3);
    } else if (flag[CTHelper.tNWrnw]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0048F, -0.015F, 0.0048F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 2);
        this.bindTexture(texture4);
        this.model2.render(0.0625F, 3);
    } else if (flag[CTHelper.tSErse]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(-0.0048F, -0.015F, -0.0048F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 2);
        this.bindTexture(texture4);
        this.model2.render(0.0625F, 3);
    } else if (flag[CTHelper.tSWrsw]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0048F, -0.015F, -0.0048F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 2);
        this.bindTexture(texture4);
        this.model2.render(0.0625F, 3);
    } else if (flag[CTHelper.NErSW]) {
        GL11.glScalef(0.98F, 0.98F, 0.98F);
        GL11.glTranslatef(0.0F, -0.03F, 0.0011F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 6);
        this.bindTexture(texture6);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.NWrSE]) {
        GL11.glScalef(0.98F, 0.98F, 0.98F);
        GL11.glTranslatef(0.0011F, -0.03F, 0.0F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 6);
        this.bindTexture(texture6);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.SErNW]) {
        GL11.glScalef(0.98F, 0.98F, 0.98F);
        GL11.glTranslatef(-0.0011F, -0.03F, 0.0F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 6);
        this.bindTexture(texture6);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.SWrNE]) {
        GL11.glScalef(0.98F, 0.98F, 0.98F);
        GL11.glTranslatef(0.0F, -0.03F, -0.0011F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 6);
        this.bindTexture(texture6);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.NSErW]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.00F);
        this.bindTexture(texture3);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 1);
        this.bindTexture(texture6);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.NSWrE]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.00F);
        this.bindTexture(texture3);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 1);
        this.bindTexture(texture6);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.NEWrS]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.00F);
        this.bindTexture(texture3);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 1);
        this.bindTexture(texture6);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.SEWrN]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.00F);
        this.bindTexture(texture3);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 1);
        this.bindTexture(texture6);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.NSEWrnesenwsw]) {
        GL11.glScalef(0.9995F, 0.9995F, 0.9995F);
        GL11.glTranslatef(0.0F, -0.0046F, 0.0F);
        this.bindTexture(texture8);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 8);
    } else {
        GL11.glScalef(0.9995F, 0.9995F, 0.9995F);
        GL11.glTranslatef(0.0F, -0.0046F, 0.0F);
        this.bindTexture(texture);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model.render(0.0625F);
    }
    GL11.glPopMatrix();
}

From source file:fr.mcnanotech.kevin_68.nanotechmod.city.client.renderer.tileentity.TileEntityTrashCanRender.java

License:Creative Commons License

public void renderTileEntityTrashCanAt(TileEntityTrashCan tileentity, double x, double y, double z,
        float tick) {
    GL11.glPushMatrix();//from w  ww .jav a2 s.  co  m
    GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
    this.bindTexture(texture);
    GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
    GL11.glScalef(0.8F, 0.8F, 0.8F);
    GL11.glTranslatef(0.0F, 0.38F, 0.0F);
    this.model.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
    GL11.glPopMatrix();
}

From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.model.ModelDancer.java

License:Creative Commons License

public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
    setRotationAngles(f, f1, f2, f3, f4, f5, entity);
    GL11.glPushMatrix();/* w w w .ja va 2  s. c o  m*/
    GL11.glTranslatef((float) Math.sin(this.entityTicks) * 0.105F, 0.0F,
            (float) Math.sin(this.entityTicks) * 0.105F);
    GL11.glPushMatrix();
    GL11.glTranslatef((float) Math.sin(this.entityTicks) * -0.015F, 0.0F, 0.0F);
    this.head.render(f5);
    GL11.glPopMatrix();

    GL11.glPushMatrix();
    GL11.glTranslatef((float) Math.sin(this.entityTicks) * 0.025F,
            (float) Math.abs(Math.cos(this.entityTicks)) * 0.125F - 0.02F, 0.0F);
    this.leftarm.render(f5);
    this.leftarm2.render(f5);
    GL11.glPopMatrix();

    GL11.glPushMatrix();
    GL11.glTranslatef((float) Math.sin(this.entityTicks) * 0.025F,
            (float) Math.abs(Math.cos(this.entityTicks)) * 0.125F - 0.02F, 0.0F);
    GL11.glRotatef((float) Math.sin(this.entityTicks) * 0.025F, 0.0F, 1.0F, 0.0F);
    this.rightarm.render(f5);
    this.rightarm2.render(f5);
    GL11.glPopMatrix();

    GL11.glPushMatrix();
    GL11.glTranslatef((float) Math.sin(this.entityTicks) * 0.015F, 0.0F, 0.0F);
    this.body.render(f5);
    GL11.glPopMatrix();

    GL11.glPushMatrix();
    GL11.glTranslatef((float) (Math.sin(this.entityTicks) * -0.025F),
            (float) (Math.abs(Math.cos(this.entityTicks)) * -0.125F), 0.0F);
    this.rightleg.render(f5);
    this.rightleg2.render(f5);
    GL11.glPopMatrix();

    GL11.glPushMatrix();
    GL11.glTranslatef((float) Math.sin(Math.PI - this.entityTicks) * 0.025F,
            (float) Math.abs(Math.cos(Math.PI - this.entityTicks)) * 0.125F - 0.13F, 0.0F);
    this.leftleg.render(f5);
    this.leftleg2.render(f5);
    GL11.glPopMatrix();
    GL11.glPopMatrix();
}

From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.items.ItemAltersRender.java

License:Creative Commons License

@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    switch (type) {
    case EQUIPPED: {
        GL11.glPushMatrix();/*www  .  j  av  a2  s.c  om*/
        Minecraft.getMinecraft().renderEngine.bindTexture(texture);
        GL11.glRotatef(-80, 1.0F, 0.0F, 0.0F);
        GL11.glTranslatef(0.4F, -0.08F, 0.0F);
        GL11.glScalef(2.0F, 2.0F, 2.0F);
        model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
        GL11.glPopMatrix();
        break;
    }
    case EQUIPPED_FIRST_PERSON: {
        GL11.glPushMatrix();
        Minecraft.getMinecraft().renderEngine.bindTexture(texture);
        GL11.glRotatef(-80, 1.0F, 0.0F, 0.0F);
        GL11.glTranslatef(0.4F, -0.08F, 0.0F);
        GL11.glScalef(2.0F, 2.0F, 2.0F);
        model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
        GL11.glPopMatrix();
        break;
    }
    case ENTITY: {
        GL11.glPushMatrix();
        Minecraft.getMinecraft().renderEngine.bindTexture(texture);
        GL11.glRotatef(0, 1.0F, 0.0F, 0.0F);
        GL11.glTranslatef(0.4F, 0.2F, 0.0F);
        GL11.glScalef(2.0F, 2.0F, 2.0F);
        if (RenderItem.renderInFrame) {
            GL11.glScalef(0.3F, 0.3F, 0.3F);
            GL11.glTranslatef(-0.7F, 0.2F, 0.1F);
            GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
        }
        model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
        GL11.glPopMatrix();
        break;
    }
    default:
        break;
    }
}

From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.items.ItemBlockPortableChestRender.java

License:Creative Commons License

@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    if (item.getItemDamage() == 0) {
        switch (type) {
        case EQUIPPED: {
            GL11.glPushMatrix();//from   w ww .  j av a  2  s  .com
            Minecraft.getMinecraft().renderEngine.bindTexture(texture);
            GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(-25F, 0.0F, 0.0F, 1.0F);
            GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(0.0F, -0.5F, 0.0F);
            model.render(0.0625F);
            GL11.glPopMatrix();
            break;
        }
        case EQUIPPED_FIRST_PERSON: {
            GL11.glPushMatrix();
            Minecraft.getMinecraft().renderEngine.bindTexture(texture);
            GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(-30F, 0.0F, 0.0F, 1.0F);
            GL11.glRotatef(-86.9F, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(0.9F, -0.8F, -1.8F);
            GL11.glScaled(1.5F, 1.5F, 1.5F);
            model.render(0.0625F);
            GL11.glPopMatrix();

            GL11.glPushMatrix();
            if (((AbstractClientPlayer) ((Entity) data[1])).getLocationSkin() != null) {
                player = ((AbstractClientPlayer) ((Entity) data[1])).getLocationSkin();
            } else {
                player = steveTextures;
            }
            Minecraft.getMinecraft().renderEngine.bindTexture(player);
            GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(-120F, 0.0F, 0.0F, 1.0F);
            GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(2.0F, 0.5F, 0.2F);
            modelB.bipedRightArm.render(0.0625F);
            GL11.glPopMatrix();

            GL11.glPushMatrix();
            if (((AbstractClientPlayer) ((Entity) data[1])).getLocationSkin() != null) {
                player = ((AbstractClientPlayer) ((Entity) data[1])).getLocationSkin();
            } else {
                player = steveTextures;
            }
            Minecraft.getMinecraft().renderEngine.bindTexture(player);
            GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(-120F, 0.0F, 0.0F, 1.0F);
            GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
            GL11.glTranslatef(-0.32F, 0.5F, 0.2F);
            modelB.bipedLeftArm.render(0.0625F);
            GL11.glPopMatrix();
            break;
        }
        case ENTITY: {
            if (RenderItem.renderInFrame) {
                GL11.glPushMatrix();
                Minecraft.getMinecraft().renderEngine.bindTexture(texture);
                GL11.glTranslatef(0.2F, -1.25F, 0.0F);
                GL11.glScalef(1.4F, 1.4F, 1.4F);
                GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
                model.render(0.0625F);
                GL11.glPopMatrix();
                break;
            }
        }
        default:
            break;
        }
    }
}

From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.items.ItemCrazyGlassesGunRender.java

License:Creative Commons License

@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    switch (type) {
    case EQUIPPED: {
        GL11.glPushMatrix();/*from   www  . j a va2s .  c  o m*/
        Minecraft.getMinecraft().renderEngine.bindTexture(texture);
        GL11.glRotatef(75F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(-30F, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(-65F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(110F, 1.0F, 1.0F, 0.0F);
        GL11.glTranslatef(0.45F, -0.1F, 0.1F);
        GL11.glScalef(2.0F, 2.0F, 2.0F);
        model.render(0.0625F, item);
        GL11.glPopMatrix();
        break;
    }
    case EQUIPPED_FIRST_PERSON: {
        GL11.glPushMatrix();
        Minecraft.getMinecraft().renderEngine.bindTexture(texture);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(140F, 1.0F, 0.0F, 0.0F);
        GL11.glTranslatef(0.0F, 0.0F, -0.8F);
        model.render(0.0625F, item);
        GL11.glPopMatrix();
        break;
    }
    case INVENTORY: {
        GL11.glPushMatrix();
        Minecraft.getMinecraft().renderEngine.bindTexture(texture);
        GL11.glTranslatef(0.0F, -0.2F, 0.5F);
        GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(1.7F, 1.7F, 1.7F);
        model.render(0.0625F, item);
        GL11.glPopMatrix();
        break;
    }
    default:
        break;
    }
}

From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.items.ItemLightSaberRender.java

License:Creative Commons License

@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    int red = (item.hasTagCompound() && item.getTagCompound().hasKey("red"))
            ? item.getTagCompound().getInteger("red")
            : 0;//from  w w w  .  j a  v  a2 s. c o  m
    int green = (item.hasTagCompound() && item.getTagCompound().hasKey("green"))
            ? item.getTagCompound().getInteger("green")
            : 0;
    int blue = (item.hasTagCompound() && item.getTagCompound().hasKey("blue"))
            ? item.getTagCompound().getInteger("blue")
            : 0;
    switch (type) {
    case EQUIPPED: {
        GL11.glPushMatrix();
        Minecraft.getMinecraft().renderEngine.bindTexture(texture);
        GL11.glRotatef(-140, 0.0F, 0.0F, 1.0F);
        GL11.glTranslatef(-0.65F, -1.35F, 0.0F);
        model.render(0.0625F, item, false);
        GL11.glColor3d((float) (red) / 255.0F, (float) (green) / 255.0F, (float) (blue) / 255.0F);
        model.render(0.0625F, item, true);
        GL11.glPopMatrix();
        break;
    }
    case EQUIPPED_FIRST_PERSON: {
        GL11.glPushMatrix();
        Minecraft.getMinecraft().renderEngine.bindTexture(texture);
        GL11.glRotatef(-140, 0.0F, 0.0F, 1.0F);
        GL11.glTranslatef(-0.65F, -1.35F, 0.0F);
        model.render(0.0625F, item, false);
        GL11.glColor3d((float) (red) / 255.0F, (float) (green) / 255.0F, (float) (blue) / 255.0F);
        model.render(0.0625F, item, true);
        GL11.glPopMatrix();
        break;
    }
    case ENTITY: {
        GL11.glPushMatrix();
        Minecraft.getMinecraft().renderEngine.bindTexture(texture);
        GL11.glRotatef(0, 1.0F, 0.0F, 0.0F);
        GL11.glTranslatef(0.4F, 0.2F, 0.0F);
        GL11.glScalef(2.0F, 2.0F, 2.0F);
        if (RenderItem.renderInFrame) {
            GL11.glScalef(0.5F, 0.5F, 0.5F);
            GL11.glTranslatef(-1.1F, -0.5F, 0.1F);
            GL11.glRotatef(-45.0F, 0.0F, 0.0F, 1.0F);
        }
        model.render(0.0625F, item, false);
        GL11.glColor3d((float) (red) / 255.0F, (float) (green) / 255.0F, (float) (blue) / 255.0F);
        model.render(0.0625F, item, true);
        GL11.glPopMatrix();
        break;
    }
    case INVENTORY: {
        GL11.glPushMatrix();
        Minecraft.getMinecraft().renderEngine.bindTexture(texture);
        GL11.glRotatef(45.F, 0.0F, 0.0F, 1.0F);
        GL11.glTranslatef(11.5F, -16.0F, 0.0F);
        GL11.glScalef(17F, 17F, 17F);
        model.render(0.0625F, item, false);
        GL11.glColor3d((float) (red) / 255.0F, (float) (green) / 255.0F, (float) (blue) / 255.0F);
        model.render(0.0625F, item, true);
        GL11.glPopMatrix();
        break;
    }
    default:
        break;
    }
}

From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.items.ItemNanomiteArrowGunRender.java

License:Creative Commons License

@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    switch (type) {
    case EQUIPPED: {
        GL11.glPushMatrix();//w w  w . j ava 2s  .c  o  m
        Minecraft.getMinecraft().renderEngine.bindTexture(texture);
        GL11.glRotatef(17F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(43F, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(-50F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(78F, 1.0F, 1.0F, 0.0F);
        GL11.glTranslatef(0.45F, 0.1F, 0.1F);
        model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
        GL11.glPopMatrix();
        break;
    }
    default:
        break;
    }
}