221 lines
6.1 KiB
Java
221 lines
6.1 KiB
Java
// Date: 9/17/2013 12:00:07 AM
|
|
// Template version 1.1
|
|
// Java generated by Techne
|
|
// Keep in mind that you still need to fill in some blanks
|
|
// - ZeuX
|
|
|
|
package resonantinduction.old.client.model;
|
|
|
|
import net.minecraft.client.model.ModelBase;
|
|
import net.minecraft.client.model.ModelRenderer;
|
|
|
|
public class ModelGrinder extends ModelBase
|
|
{
|
|
// fields
|
|
ModelRenderer base;
|
|
ModelRenderer rightSide;
|
|
ModelRenderer leftSide;
|
|
ModelRenderer front;
|
|
ModelRenderer back;
|
|
ModelRenderer top;
|
|
ModelRenderer uDisk1;
|
|
ModelRenderer uDisk2;
|
|
ModelRenderer uDisk3;
|
|
ModelRenderer uDisk4;
|
|
ModelRenderer uDisk5;
|
|
ModelRenderer uDisk6;
|
|
ModelRenderer dDisk1;
|
|
ModelRenderer dDisk2;
|
|
ModelRenderer dDisk3;
|
|
ModelRenderer dDisk4;
|
|
ModelRenderer dDisk5;
|
|
ModelRenderer dDisk6;
|
|
|
|
ModelRenderer[] topDiskSet;
|
|
ModelRenderer[] bottomDiskSet;
|
|
|
|
public ModelGrinder()
|
|
{
|
|
textureWidth = 128;
|
|
textureHeight = 128;
|
|
|
|
base = new ModelRenderer(this, 1, 109);
|
|
base.addBox(-8F, 0F, -8F, 16, 2, 16);
|
|
base.setRotationPoint(0F, 22F, 0F);
|
|
base.setTextureSize(128, 128);
|
|
base.mirror = true;
|
|
setRotation(base, 0F, 0F, 0F);
|
|
rightSide = new ModelRenderer(this, 0, 80);
|
|
rightSide.addBox(0F, 0F, 0F, 2, 13, 13);
|
|
rightSide.setRotationPoint(-8F, 9F, -6F);
|
|
rightSide.setTextureSize(128, 128);
|
|
rightSide.mirror = true;
|
|
setRotation(rightSide, 0F, 0F, 0F);
|
|
leftSide = new ModelRenderer(this, 40, 80);
|
|
leftSide.addBox(0F, 0F, 0F, 2, 13, 13);
|
|
leftSide.setRotationPoint(6F, 9F, -6F);
|
|
leftSide.setTextureSize(128, 128);
|
|
leftSide.mirror = true;
|
|
setRotation(leftSide, 0F, 0F, 0F);
|
|
front = new ModelRenderer(this, 78, 114);
|
|
front.addBox(-8F, 0F, -8F, 16, 5, 2);
|
|
front.setRotationPoint(0F, 17F, 0F);
|
|
front.setTextureSize(128, 128);
|
|
front.mirror = true;
|
|
setRotation(front, 0F, 0F, 0F);
|
|
back = new ModelRenderer(this, 78, 95);
|
|
back.addBox(-8F, 0F, -3F, 16, 13, 1);
|
|
back.setRotationPoint(0F, 9F, 10F);
|
|
back.setTextureSize(128, 128);
|
|
back.mirror = true;
|
|
setRotation(back, 0F, 0F, 0F);
|
|
top = new ModelRenderer(this, 1, 65);
|
|
top.addBox(-8F, 0F, -8F, 14, 1, 10);
|
|
top.setRotationPoint(1F, 8F, 5F);
|
|
top.setTextureSize(128, 128);
|
|
top.mirror = true;
|
|
setRotation(top, 0F, 0F, 0F);
|
|
uDisk1 = new ModelRenderer(this, 0, 0);
|
|
uDisk1.addBox(0F, -4F, -4F, 1, 8, 8);
|
|
uDisk1.setRotationPoint(-6F, 14F, 1F);
|
|
uDisk1.setTextureSize(128, 128);
|
|
uDisk1.mirror = true;
|
|
setRotation(uDisk1, 0.7853982F, 0F, 0F);
|
|
uDisk2 = new ModelRenderer(this, 0, 0);
|
|
uDisk2.addBox(0F, -4F, -4F, 1, 8, 8);
|
|
uDisk2.setRotationPoint(-4F, 14F, 1F);
|
|
uDisk2.setTextureSize(128, 128);
|
|
uDisk2.mirror = true;
|
|
setRotation(uDisk2, 0F, 0F, 0F);
|
|
uDisk3 = new ModelRenderer(this, 0, 0);
|
|
uDisk3.addBox(4F, -4F, -4F, 1, 8, 8);
|
|
uDisk3.setRotationPoint(-6F, 14F, 1F);
|
|
uDisk3.setTextureSize(128, 128);
|
|
uDisk3.mirror = true;
|
|
setRotation(uDisk3, 0.7853982F, 0F, 0F);
|
|
uDisk4 = new ModelRenderer(this, 0, 0);
|
|
uDisk4.addBox(6F, -4F, -4F, 1, 8, 8);
|
|
uDisk4.setRotationPoint(-6F, 14F, 1F);
|
|
uDisk4.setTextureSize(128, 128);
|
|
uDisk4.mirror = true;
|
|
setRotation(uDisk4, 0F, 0F, 0F);
|
|
uDisk5 = new ModelRenderer(this, 0, 0);
|
|
uDisk5.addBox(8F, -4F, -4F, 1, 8, 8);
|
|
uDisk5.setRotationPoint(-6F, 14F, 1F);
|
|
uDisk5.setTextureSize(128, 128);
|
|
uDisk5.mirror = true;
|
|
setRotation(uDisk5, 0.7853982F, 0F, 0F);
|
|
uDisk6 = new ModelRenderer(this, 0, 0);
|
|
uDisk6.addBox(10F, -4F, -4F, 1, 8, 8);
|
|
uDisk6.setRotationPoint(-6F, 14F, 1F);
|
|
uDisk6.setTextureSize(128, 128);
|
|
uDisk6.mirror = true;
|
|
setRotation(uDisk6, 0F, 0F, 0F);
|
|
dDisk1 = new ModelRenderer(this, 0, 0);
|
|
dDisk1.addBox(0F, -4F, -4F, 1, 8, 8);
|
|
dDisk1.setRotationPoint(-5F, 17F, 0F);
|
|
dDisk1.setTextureSize(128, 128);
|
|
dDisk1.mirror = true;
|
|
setRotation(dDisk1, 0F, 0F, 0F);
|
|
dDisk2 = new ModelRenderer(this, 0, 0);
|
|
dDisk2.addBox(2F, -4F, -4F, 1, 8, 8);
|
|
dDisk2.setRotationPoint(-5F, 17F, 0F);
|
|
dDisk2.setTextureSize(128, 128);
|
|
dDisk2.mirror = true;
|
|
setRotation(dDisk2, 0.7853982F, 0F, 0F);
|
|
dDisk3 = new ModelRenderer(this, 0, 0);
|
|
dDisk3.addBox(4F, -4F, -4F, 1, 8, 8);
|
|
dDisk3.setRotationPoint(-5F, 17F, 0F);
|
|
dDisk3.setTextureSize(128, 128);
|
|
dDisk3.mirror = true;
|
|
setRotation(dDisk3, 0F, 0F, 0F);
|
|
dDisk4 = new ModelRenderer(this, 0, 0);
|
|
dDisk4.addBox(6F, -4F, -4F, 1, 8, 8);
|
|
dDisk4.setRotationPoint(-5F, 17F, 0F);
|
|
dDisk4.setTextureSize(128, 128);
|
|
dDisk4.mirror = true;
|
|
setRotation(dDisk4, 0.7853982F, 0F, 0F);
|
|
dDisk5 = new ModelRenderer(this, 0, 0);
|
|
dDisk5.addBox(8F, -4F, -4F, 1, 8, 8);
|
|
dDisk5.setRotationPoint(-5F, 17F, 0F);
|
|
dDisk5.setTextureSize(128, 128);
|
|
dDisk5.mirror = true;
|
|
setRotation(dDisk5, 0F, 0F, 0F);
|
|
dDisk6 = new ModelRenderer(this, 0, 0);
|
|
dDisk6.addBox(10F, -4F, -4F, 1, 8, 8);
|
|
dDisk6.setRotationPoint(-5F, 17F, 0F);
|
|
dDisk6.setTextureSize(128, 128);
|
|
dDisk6.mirror = true;
|
|
setRotation(dDisk6, 0.7853982F, 0F, 0F);
|
|
|
|
topDiskSet = new ModelRenderer[] { uDisk1, uDisk2, uDisk3, uDisk4, uDisk5, uDisk6 };
|
|
bottomDiskSet = new ModelRenderer[] { dDisk1, dDisk2, dDisk3, dDisk4, dDisk5, dDisk6 };
|
|
}
|
|
|
|
public void renderBody(float f5)
|
|
{
|
|
base.render(f5);
|
|
rightSide.render(f5);
|
|
leftSide.render(f5);
|
|
front.render(f5);
|
|
back.render(f5);
|
|
top.render(f5);
|
|
|
|
}
|
|
|
|
public void renderRotation(float f5, int stage)
|
|
{
|
|
float rotation = 0.3926990816987241F * stage;
|
|
this.resetRotation();
|
|
// Set new rotation angle
|
|
for (int i = 0; i < 6; i++)
|
|
{
|
|
topDiskSet[i].rotateAngleX += rotation;
|
|
bottomDiskSet[i].rotateAngleX -= rotation;
|
|
}
|
|
|
|
// render
|
|
for (int i = 0; i < 6; i++)
|
|
{
|
|
topDiskSet[i].render(f5);
|
|
bottomDiskSet[i].render(f5);
|
|
}
|
|
this.resetRotation();
|
|
}
|
|
|
|
/** Resets default rotation of the spinning disks */
|
|
public void resetRotation()
|
|
{
|
|
for (int i = 0; i < topDiskSet.length; i++)
|
|
{
|
|
if (i == 0 || i % 2 == 0)
|
|
{
|
|
topDiskSet[i].rotateAngleX = 0.7853982F;
|
|
}
|
|
else
|
|
{
|
|
topDiskSet[i].rotateAngleX = 0F;
|
|
}
|
|
}
|
|
for (int i = 0; i < bottomDiskSet.length; i++)
|
|
{
|
|
if (i != 0 && i % 2 != 0)
|
|
{
|
|
bottomDiskSet[i].rotateAngleX = 0.7853982F;
|
|
}
|
|
else
|
|
{
|
|
bottomDiskSet[i].rotateAngleX = 0F;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
private void setRotation(ModelRenderer model, float x, float y, float z)
|
|
{
|
|
model.rotateAngleX = x;
|
|
model.rotateAngleY = y;
|
|
model.rotateAngleZ = z;
|
|
}
|
|
|
|
}
|