diff options
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/model/ModelRing.java')
| -rwxr-xr-x | src/main/java/darkknight/jewelrycraft/model/ModelRing.java | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/model/ModelRing.java b/src/main/java/darkknight/jewelrycraft/model/ModelRing.java index d2f11c9..a9b8e34 100755 --- a/src/main/java/darkknight/jewelrycraft/model/ModelRing.java +++ b/src/main/java/darkknight/jewelrycraft/model/ModelRing.java @@ -49,16 +49,19 @@ public class ModelRing extends ModelBase { int red = (ingotColor >> 16) & 0xff; int green = (ingotColor >> 8) & 0xff; int blue = ingotColor & 0xff; - GL11.glColor3f((float) red / 255, (float) green / 255, + GL11.glColor3f((float) red / 255, + (float) green / 255, (float) blue / 255); GL11.glPushMatrix(); - GL11.glTranslatef(this.ring1.offsetX, this.ring1.offsetY, + GL11.glTranslatef(this.ring1.offsetX, + this.ring1.offsetY, this.ring1.offsetZ); GL11.glTranslatef(this.ring1.rotationPointX * f5, this.ring1.rotationPointY * f5, this.ring1.rotationPointZ * f5); GL11.glScaled(0.1D, 0.3D, 0.3D); - GL11.glTranslatef(-this.ring1.offsetX, -this.ring1.offsetY, + GL11.glTranslatef(-this.ring1.offsetX, + -this.ring1.offsetY, -this.ring1.offsetZ); GL11.glTranslatef(-this.ring1.rotationPointX * f5, -this.ring1.rotationPointY * f5, @@ -66,13 +69,15 @@ public class ModelRing extends ModelBase { this.ring1.render(f5); GL11.glPopMatrix(); GL11.glPushMatrix(); - GL11.glTranslatef(this.ring2.offsetX, this.ring2.offsetY, + GL11.glTranslatef(this.ring2.offsetX, + this.ring2.offsetY, this.ring2.offsetZ); GL11.glTranslatef(this.ring2.rotationPointX * f5, this.ring2.rotationPointY * f5, this.ring2.rotationPointZ * f5); GL11.glScaled(0.1D, 0.3D, 0.3D); - GL11.glTranslatef(-this.ring2.offsetX, -this.ring2.offsetY, + GL11.glTranslatef(-this.ring2.offsetX, + -this.ring2.offsetY, -this.ring2.offsetZ); GL11.glTranslatef(-this.ring2.rotationPointX * f5, -this.ring2.rotationPointY * f5, @@ -80,13 +85,15 @@ public class ModelRing extends ModelBase { this.ring2.render(f5); GL11.glPopMatrix(); GL11.glPushMatrix(); - GL11.glTranslatef(this.ring3.offsetX, this.ring3.offsetY, + GL11.glTranslatef(this.ring3.offsetX, + this.ring3.offsetY, this.ring3.offsetZ); GL11.glTranslatef(this.ring3.rotationPointX * f5, this.ring3.rotationPointY * f5, this.ring3.rotationPointZ * f5); GL11.glScaled(0.2D, 0.3D, 0.1D); - GL11.glTranslatef(-this.ring3.offsetX, -this.ring3.offsetY, + GL11.glTranslatef(-this.ring3.offsetX, + -this.ring3.offsetY, -this.ring3.offsetZ); GL11.glTranslatef(-this.ring3.rotationPointX * f5, -this.ring3.rotationPointY * f5, @@ -99,19 +106,22 @@ public class ModelRing extends ModelBase { int red = gemColor >> 16 & 0xff; int green = gemColor >> 8 & 0xff; int blue = gemColor & 0xff; - GL11.glColor3f((float) red / 255, (float) green / 255, + GL11.glColor3f((float) red / 255, + (float) green / 255, (float) blue / 255); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR); GL11.glPushMatrix(); - GL11.glTranslatef(this.gem.offsetX, this.gem.offsetY, + GL11.glTranslatef(this.gem.offsetX, + this.gem.offsetY, this.gem.offsetZ); GL11.glTranslatef(this.gem.rotationPointX * f5, this.gem.rotationPointY * f5, this.gem.rotationPointZ * f5); GL11.glScaled(0.1D, 0.1D, 0.1D); - GL11.glTranslatef(-this.gem.offsetX, -this.gem.offsetY, + GL11.glTranslatef(-this.gem.offsetX, + -this.gem.offsetY, -this.gem.offsetZ); GL11.glTranslatef(-this.gem.rotationPointX * f5, -this.gem.rotationPointY * f5, @@ -119,13 +129,15 @@ public class ModelRing extends ModelBase { this.gem.render(f5); GL11.glPopMatrix(); GL11.glPushMatrix(); - GL11.glTranslatef(this.gem1.offsetX, this.gem1.offsetY, + GL11.glTranslatef(this.gem1.offsetX, + this.gem1.offsetY, this.gem1.offsetZ); GL11.glTranslatef(this.gem1.rotationPointX * f5, this.gem1.rotationPointY * f5, this.gem1.rotationPointZ * f5); GL11.glScaled(0.1D, 0.05D, 0.1D); - GL11.glTranslatef(-this.gem1.offsetX, -this.gem1.offsetY, + GL11.glTranslatef(-this.gem1.offsetX, + -this.gem1.offsetY, -this.gem1.offsetZ); GL11.glTranslatef(-this.gem1.rotationPointX * f5, -this.gem1.rotationPointY * f5, @@ -133,13 +145,15 @@ public class ModelRing extends ModelBase { this.gem1.render(f5); GL11.glPopMatrix(); GL11.glPushMatrix(); - GL11.glTranslatef(this.gem2.offsetX, this.gem2.offsetY, + GL11.glTranslatef(this.gem2.offsetX, + this.gem2.offsetY, this.gem2.offsetZ); GL11.glTranslatef(this.gem2.rotationPointX * f5, this.gem2.rotationPointY * f5, this.gem2.rotationPointZ * f5); GL11.glScaled(0.1D, 0.05D, 0.1D); - GL11.glTranslatef(-this.gem2.offsetX, -this.gem2.offsetY, + GL11.glTranslatef(-this.gem2.offsetX, + -this.gem2.offsetY, -this.gem2.offsetZ); GL11.glTranslatef(-this.gem2.rotationPointX * f5, -this.gem2.rotationPointY * f5, @@ -151,8 +165,8 @@ public class ModelRing extends ModelBase { } /** - * This is a helper function from Tabula to set the rotation of model - * parts + * This is a helper function from Tabula to set the rotation of + * model parts */ public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { |
