@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch (type) { case EQUIPPED: { GL11.glPushMatrix(); GL11.glTranslatef(0.8f, 0.2f, 0.8f); GL11.glRotatef(135, 0.0f, 1.0f, 0.0f); GL11.glRotatef(-65, 0.0f, 0.0f, 1.0f); // GL11.glRotatef(-45, 1.0f, 0.0f, 0.0f); GL11.glScalef(0.09f, 0.09f, 0.09f); GL11.glShadeModel(GL11.GL_SMOOTH); model1.render(); GL11.glTranslatef(12, 4, 0); glRotated(180, 1, 0, 0); drawLightningBolt((Entity) data[1]); GL11.glPopMatrix(); break; } case EQUIPPED_FIRST_PERSON: { GL11.glPushMatrix(); GL11.glTranslatef(0.9f, 0.5f, 0.9f); GL11.glRotatef(40, 0.0f, 1.0f, 0.0f); // GL11.glRotatef(-10, 0.0f, 0.0f, 1.0f); GL11.glScalef(0.09f, 0.09f, 0.09f); GL11.glShadeModel(GL11.GL_SMOOTH); model1.render(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glRotatef(-40, 0.0f, 1.0f, 0.0f); GL11.glRotatef(90, 0.0f, 0.0f, 1.0f); GL11.glRotatef(90, 0.0f, 1.0f, 0.0f); GL11.glRotatef(-90, 1.0f, 0.0f, 0.0f); GL11.glRotatef(-10, 0.0f, 0.0f, 1.0f); GL11.glTranslatef(1.5f, -0.45f, -1.25f); GL11.glRotatef(-5, 0.0f, 1.0f, 0.0f); GL11.glRotatef(3.5f, 0.0f, 0.0f, 1.0f); GL11.glScalef(0.09f, 0.09f, 0.09f); GL11.glShadeModel(GL11.GL_SMOOTH); drawLightningBolt((Entity) data[1]); GL11.glPopMatrix(); break; } case ENTITY: { GL11.glPushMatrix(); GL11.glScalef(0.04f, 0.04f, 0.04f); GL11.glTranslatef(0f, 0f, 10.0f); GL11.glScalef(0.6f, 0.6f, 0.6f); GL11.glRotatef(90, 0.0f, 1.0f, 0.0f); GL11.glShadeModel(GL11.GL_SMOOTH); model1.render(); GL11.glPopMatrix(); break; } default: break; } }
public TeslaClawRender() { model1 = new TessellatorModel("/assets/rcmod/models/TeslaClaw.obj"); model1.regenerateNormals(); }