atomicscience/src/main/java/atomicscience/muoxing/MTurbine.java
2022-10-21 19:53:56 +02:00

222 lines
11 KiB
Java

package atomicscience.muoxing;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
@SideOnly(Side.CLIENT)
public class MTurbine extends ModelBase {
ModelRenderer SUPPORT;
ModelRenderer PLUG;
ModelRenderer MAIN_AXIS_SPINS;
ModelRenderer BLADE_A1_SPINS;
ModelRenderer BLADE_A2_SPINS;
ModelRenderer BLADE_A3_SPINS;
ModelRenderer BLADE_B1_SPINS;
ModelRenderer BLADE_B2_SPINS;
ModelRenderer BLADE_B3_SPINS;
ModelRenderer TURBINE_HEAD_SPINS;
ModelRenderer SHIELD_A1_SPINS;
ModelRenderer SHIELD_A2_SPINS;
ModelRenderer SHIELD_A3_SPINS;
ModelRenderer SHIELD_A4_SPINS;
ModelRenderer SHIELD_A5_SPINS;
ModelRenderer SHIELD_A6_SPINS;
ModelRenderer SHIELD_B1_SPINS;
ModelRenderer SHIELD_B2_SPINS;
ModelRenderer SHIELD_B3_SPINS;
ModelRenderer SHIELD_B4_SPINS;
ModelRenderer SHIELD_B5_SPINS;
ModelRenderer SHIELD_B6_SPINS;
public MTurbine() {
super.textureWidth = 64;
super.textureHeight = 64;
this.SUPPORT = new ModelRenderer(this, 0, 0);
this.SUPPORT.addBox(0.0F, 0.0F, 0.0F, 8, 1, 8);
this.SUPPORT.setRotationPoint(-4.0F, 9.0F, -4.0F);
this.SUPPORT.setTextureSize(64, 64);
this.SUPPORT.mirror = true;
this.setRotation(this.SUPPORT, 0.0F, 0.0F, 0.0F);
this.PLUG = new ModelRenderer(this, 0, 10);
this.PLUG.addBox(0.0F, 0.0F, 0.0F, 4, 1, 4);
this.PLUG.setRotationPoint(-2.0F, 8.0F, -2.0F);
this.PLUG.setTextureSize(64, 64);
this.PLUG.mirror = true;
this.setRotation(this.PLUG, 0.0F, 0.0F, 0.0F);
this.MAIN_AXIS_SPINS = new ModelRenderer(this, 33, 0);
this.MAIN_AXIS_SPINS.addBox(-1.0F, 0.0F, -1.0F, 2, 13, 2);
this.MAIN_AXIS_SPINS.setRotationPoint(0.0F, 10.0F, 0.0F);
this.MAIN_AXIS_SPINS.setTextureSize(64, 64);
this.MAIN_AXIS_SPINS.mirror = true;
this.setRotation(this.MAIN_AXIS_SPINS, 0.0F, 0.0F, 0.0F);
this.BLADE_A1_SPINS = new ModelRenderer(this, 0, 16);
this.BLADE_A1_SPINS.addBox(-6.0F, 0.0F, -1.0F, 12, 1, 2);
this.BLADE_A1_SPINS.setRotationPoint(0.0F, 13.0F, 0.0F);
this.BLADE_A1_SPINS.setTextureSize(64, 64);
this.BLADE_A1_SPINS.mirror = true;
this.setRotation(this.BLADE_A1_SPINS, 0.2617994F, 2.094395F, 0.0F);
this.BLADE_A2_SPINS = new ModelRenderer(this, 0, 16);
this.BLADE_A2_SPINS.addBox(-6.0F, 0.0F, -1.0F, 12, 1, 2);
this.BLADE_A2_SPINS.setRotationPoint(0.0F, 13.0F, 0.0F);
this.BLADE_A2_SPINS.setTextureSize(64, 64);
this.BLADE_A2_SPINS.mirror = true;
this.setRotation(this.BLADE_A2_SPINS, 0.2617994F, 1.047198F, 0.0F);
this.BLADE_A3_SPINS = new ModelRenderer(this, 0, 16);
this.BLADE_A3_SPINS.addBox(-6.0F, 0.0F, -1.0F, 12, 1, 2);
this.BLADE_A3_SPINS.setRotationPoint(0.0F, 13.0F, 0.0F);
this.BLADE_A3_SPINS.setTextureSize(64, 64);
this.BLADE_A3_SPINS.mirror = true;
this.setRotation(this.BLADE_A3_SPINS, 0.2617994F, 0.0F, 0.0F);
this.BLADE_B1_SPINS = new ModelRenderer(this, 0, 20);
this.BLADE_B1_SPINS.addBox(-5.0F, 0.0F, -1.0F, 10, 1, 2);
this.BLADE_B1_SPINS.setRotationPoint(0.0F, 18.0F, 0.0F);
this.BLADE_B1_SPINS.setTextureSize(64, 64);
this.BLADE_B1_SPINS.mirror = true;
this.setRotation(this.BLADE_B1_SPINS, 0.2617994F, 1.570796F, 0.0F);
this.BLADE_B2_SPINS = new ModelRenderer(this, 0, 20);
this.BLADE_B2_SPINS.addBox(-5.0F, 0.0F, -1.0F, 10, 1, 2);
this.BLADE_B2_SPINS.setRotationPoint(0.0F, 18.0F, 0.0F);
this.BLADE_B2_SPINS.setTextureSize(64, 64);
this.BLADE_B2_SPINS.mirror = true;
this.setRotation(this.BLADE_B2_SPINS, 0.2617994F, 2.617994F, 0.0F);
this.BLADE_B3_SPINS = new ModelRenderer(this, 0, 20);
this.BLADE_B3_SPINS.addBox(-5.0F, 0.0F, -1.0F, 10, 1, 2);
this.BLADE_B3_SPINS.setRotationPoint(0.0F, 18.0F, 0.0F);
this.BLADE_B3_SPINS.setTextureSize(64, 64);
this.BLADE_B3_SPINS.mirror = true;
this.setRotation(this.BLADE_B3_SPINS, 0.2617994F, 0.5235988F, 0.0F);
this.TURBINE_HEAD_SPINS = new ModelRenderer(this, 0, 24);
this.TURBINE_HEAD_SPINS.addBox(-2.0F, 0.0F, -2.0F, 4, 2, 4);
this.TURBINE_HEAD_SPINS.setRotationPoint(0.0F, 20.0F, 0.0F);
this.TURBINE_HEAD_SPINS.setTextureSize(64, 64);
this.TURBINE_HEAD_SPINS.mirror = true;
this.setRotation(this.TURBINE_HEAD_SPINS, 0.0F, 0.0F, 0.0F);
this.SHIELD_A1_SPINS = new ModelRenderer(this, 0, 40);
this.SHIELD_A1_SPINS.addBox(6.0F, 0.0F, -4.0F, 1, 2, 8);
this.SHIELD_A1_SPINS.setRotationPoint(0.0F, 13.0F, 0.0F);
this.SHIELD_A1_SPINS.setTextureSize(64, 64);
this.SHIELD_A1_SPINS.mirror = true;
this.setRotation(this.SHIELD_A1_SPINS, 0.0F, -3.141593F, 0.0F);
this.SHIELD_A2_SPINS = new ModelRenderer(this, 0, 40);
this.SHIELD_A2_SPINS.addBox(6.0F, 0.0F, -4.0F, 1, 2, 8);
this.SHIELD_A2_SPINS.setRotationPoint(0.0F, 13.0F, 0.0F);
this.SHIELD_A2_SPINS.setTextureSize(64, 64);
this.SHIELD_A2_SPINS.mirror = true;
this.setRotation(this.SHIELD_A2_SPINS, 0.0F, 1.047198F, 0.0F);
this.SHIELD_A3_SPINS = new ModelRenderer(this, 0, 40);
this.SHIELD_A3_SPINS.addBox(6.0F, 0.0F, -4.0F, 1, 2, 8);
this.SHIELD_A3_SPINS.setRotationPoint(0.0F, 13.0F, 0.0F);
this.SHIELD_A3_SPINS.setTextureSize(64, 64);
this.SHIELD_A3_SPINS.mirror = true;
this.setRotation(this.SHIELD_A3_SPINS, 0.0F, -1.047198F, 0.0F);
this.SHIELD_A4_SPINS = new ModelRenderer(this, 0, 40);
this.SHIELD_A4_SPINS.addBox(6.0F, 0.0F, -4.0F, 1, 2, 8);
this.SHIELD_A4_SPINS.setRotationPoint(0.0F, 13.0F, 0.0F);
this.SHIELD_A4_SPINS.setTextureSize(64, 64);
this.SHIELD_A4_SPINS.mirror = true;
this.setRotation(this.SHIELD_A4_SPINS, 0.0F, -2.094395F, 0.0F);
this.SHIELD_A5_SPINS = new ModelRenderer(this, 0, 40);
this.SHIELD_A5_SPINS.addBox(6.0F, 0.0F, -4.0F, 1, 2, 8);
this.SHIELD_A5_SPINS.setRotationPoint(0.0F, 13.0F, 0.0F);
this.SHIELD_A5_SPINS.setTextureSize(64, 64);
this.SHIELD_A5_SPINS.mirror = true;
this.setRotation(this.SHIELD_A5_SPINS, 0.0F, 0.0F, 0.0F);
this.SHIELD_A6_SPINS = new ModelRenderer(this, 0, 40);
this.SHIELD_A6_SPINS.addBox(6.0F, 0.0F, -4.0F, 1, 2, 8);
this.SHIELD_A6_SPINS.setRotationPoint(0.0F, 13.0F, 0.0F);
this.SHIELD_A6_SPINS.setTextureSize(64, 64);
this.SHIELD_A6_SPINS.mirror = true;
this.setRotation(this.SHIELD_A6_SPINS, 0.0F, 2.094395F, 0.0F);
this.SHIELD_B1_SPINS = new ModelRenderer(this, 0, 31);
this.SHIELD_B1_SPINS.addBox(5.0F, 0.0F, -3.0F, 1, 2, 6);
this.SHIELD_B1_SPINS.setRotationPoint(0.0F, 18.0F, 0.0F);
this.SHIELD_B1_SPINS.setTextureSize(64, 64);
this.SHIELD_B1_SPINS.mirror = true;
this.setRotation(this.SHIELD_B1_SPINS, 0.0F, -0.5235988F, 0.0F);
this.SHIELD_B2_SPINS = new ModelRenderer(this, 0, 31);
this.SHIELD_B2_SPINS.addBox(5.0F, 0.0F, -3.0F, 1, 2, 6);
this.SHIELD_B2_SPINS.setRotationPoint(0.0F, 18.0F, 0.0F);
this.SHIELD_B2_SPINS.setTextureSize(64, 64);
this.SHIELD_B2_SPINS.mirror = true;
this.setRotation(this.SHIELD_B2_SPINS, 0.0F, 1.570796F, 0.0F);
this.SHIELD_B3_SPINS = new ModelRenderer(this, 0, 31);
this.SHIELD_B3_SPINS.addBox(5.0F, 0.0F, -3.0F, 1, 2, 6);
this.SHIELD_B3_SPINS.setRotationPoint(0.0F, 18.0F, 0.0F);
this.SHIELD_B3_SPINS.setTextureSize(64, 64);
this.SHIELD_B3_SPINS.mirror = true;
this.setRotation(this.SHIELD_B3_SPINS, 0.0F, 0.5235988F, 0.0F);
this.SHIELD_B4_SPINS = new ModelRenderer(this, 0, 31);
this.SHIELD_B4_SPINS.addBox(5.0F, 0.0F, -3.0F, 1, 2, 6);
this.SHIELD_B4_SPINS.setRotationPoint(0.0F, 18.0F, 0.0F);
this.SHIELD_B4_SPINS.setTextureSize(64, 64);
this.SHIELD_B4_SPINS.mirror = true;
this.setRotation(this.SHIELD_B4_SPINS, 0.0F, -1.570796F, 0.0F);
this.SHIELD_B5_SPINS = new ModelRenderer(this, 0, 31);
this.SHIELD_B5_SPINS.addBox(5.0F, 0.0F, -3.0F, 1, 2, 6);
this.SHIELD_B5_SPINS.setRotationPoint(0.0F, 18.0F, 0.0F);
this.SHIELD_B5_SPINS.setTextureSize(64, 64);
this.SHIELD_B5_SPINS.mirror = true;
this.setRotation(this.SHIELD_B5_SPINS, 0.0F, 2.617994F, 0.0F);
this.SHIELD_B6_SPINS = new ModelRenderer(this, 0, 31);
this.SHIELD_B6_SPINS.addBox(5.0F, 0.0F, -3.0F, 1, 2, 6);
this.SHIELD_B6_SPINS.setRotationPoint(0.0F, 18.0F, 0.0F);
this.SHIELD_B6_SPINS.setTextureSize(64, 64);
this.SHIELD_B6_SPINS.mirror = true;
this.setRotation(this.SHIELD_B6_SPINS, 0.0F, -2.617994F, 0.0F);
}
public void render(float rotation, float f5) {
this.SUPPORT.render(f5);
this.PLUG.render(f5);
this.MAIN_AXIS_SPINS.rotateAngleY = -rotation;
this.MAIN_AXIS_SPINS.render(f5);
this.BLADE_A1_SPINS.rotateAngleY = (float)(-((double)rotation + 1.570796D));
this.BLADE_A1_SPINS.render(f5);
this.BLADE_A2_SPINS.rotateAngleY = (float)(-((double)rotation + 2.617994D));
this.BLADE_A2_SPINS.render(f5);
this.BLADE_A3_SPINS.rotateAngleY = (float)(-((double)rotation + 0.5235988D));
this.BLADE_A3_SPINS.render(f5);
this.BLADE_B1_SPINS.rotateAngleY = (float)((double)rotation + 1.570796D);
this.BLADE_B1_SPINS.render(f5);
this.BLADE_B2_SPINS.rotateAngleY = (float)((double)rotation + 2.617994D);
this.BLADE_B2_SPINS.render(f5);
this.BLADE_B3_SPINS.rotateAngleY = (float)((double)rotation + 0.5235988D);
this.BLADE_B3_SPINS.render(f5);
this.TURBINE_HEAD_SPINS.rotateAngleY = rotation;
this.TURBINE_HEAD_SPINS.render(f5);
this.SHIELD_A1_SPINS.rotateAngleY = -rotation;
this.SHIELD_A1_SPINS.render(f5);
this.SHIELD_A2_SPINS.rotateAngleY = (float)(-((double)rotation + 2.094395D));
this.SHIELD_A2_SPINS.render(f5);
this.SHIELD_A3_SPINS.rotateAngleY = (float)(-((double)rotation - 3.141593D));
this.SHIELD_A3_SPINS.render(f5);
this.SHIELD_A4_SPINS.rotateAngleY = (float)(-((double)rotation + 1.047198D));
this.SHIELD_A4_SPINS.render(f5);
this.SHIELD_A5_SPINS.rotateAngleY = (float)(-((double)rotation - 1.047198D));
this.SHIELD_A5_SPINS.render(f5);
this.SHIELD_A6_SPINS.rotateAngleY = (float)(-((double)rotation - 2.094395D));
this.SHIELD_A6_SPINS.render(f5);
this.SHIELD_B1_SPINS.rotateAngleY = rotation;
this.SHIELD_B1_SPINS.render(f5);
this.SHIELD_B2_SPINS.rotateAngleY = (float)((double)rotation + 2.094395D);
this.SHIELD_B2_SPINS.render(f5);
this.SHIELD_B3_SPINS.rotateAngleY = (float)((double)rotation - 3.141593D);
this.SHIELD_B3_SPINS.render(f5);
this.SHIELD_B4_SPINS.rotateAngleY = (float)((double)rotation + 1.047198D);
this.SHIELD_B4_SPINS.render(f5);
this.SHIELD_B5_SPINS.rotateAngleY = (float)((double)rotation - 1.047198D);
this.SHIELD_B5_SPINS.render(f5);
this.SHIELD_B6_SPINS.rotateAngleY = (float)((double)rotation - 2.094395D);
this.SHIELD_B6_SPINS.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}