summaryrefslogtreecommitdiff
path: root/src/main/java/darkknight/jewelrycraft/model/ModelShadowEye.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-03-23 14:51:06 +0000
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-03-23 14:51:06 +0000
commit6312636fd9a4d0f56dc7c9ff474a99d879bcb4e9 (patch)
treee3279753210bfb169a00cd3f146a80baf624150e /src/main/java/darkknight/jewelrycraft/model/ModelShadowEye.java
parente86949a1ad3269ec66c9de65e2c92f5e66251411 (diff)
Reworked the whole repo.
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/model/ModelShadowEye.java')
-rw-r--r--src/main/java/darkknight/jewelrycraft/model/ModelShadowEye.java162
1 files changed, 162 insertions, 0 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/model/ModelShadowEye.java b/src/main/java/darkknight/jewelrycraft/model/ModelShadowEye.java
new file mode 100644
index 0000000..e396f72
--- /dev/null
+++ b/src/main/java/darkknight/jewelrycraft/model/ModelShadowEye.java
@@ -0,0 +1,162 @@
+// Date: 9/26/2014 1:50:53 PM
+// Template version 1.1
+// Java generated by Techne
+// Keep in mind that you still need to fill in some blanks
+// - ZeuX
+package darkknight.jewelrycraft.model;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelShadowEye extends ModelBase
+{
+ // fields
+ ModelRenderer Eye;
+ ModelRenderer Platform1;
+ ModelRenderer Platform2;
+ ModelRenderer Atachement1;
+ ModelRenderer Atachement2;
+ ModelRenderer Cable1;
+ ModelRenderer Cable2;
+ ModelRenderer Cable3;
+ ModelRenderer Cable4;
+ float field_82221_e, field_82220_d;
+
+ /**
+ *
+ */
+ public ModelShadowEye()
+ {
+ textureWidth = 64;
+ textureHeight = 32;
+ Eye = new ModelRenderer(this, 0, 0);
+ Eye.addBox(-3.5F, -3.5F, -3.5F, 7, 7, 7);
+ Eye.setRotationPoint(0F, 17.5F, 0F);
+ Eye.setTextureSize(64, 32);
+ Eye.mirror = true;
+ setRotation(Eye, 0F, 0F, 0F);
+ Platform1 = new ModelRenderer(this, 0, 14);
+ Platform1.addBox(0F, 0F, 0F, 2, 2, 16);
+ Platform1.setRotationPoint(-1F, 11F, -8F);
+ Platform1.setTextureSize(64, 32);
+ Platform1.mirror = true;
+ setRotation(Platform1, 0F, 0F, 0F);
+ Platform2 = new ModelRenderer(this, 0, 14);
+ Platform2.addBox(0F, 0F, 0F, 2, 2, 16);
+ Platform2.setRotationPoint(-1F, 22F, -8F);
+ Platform2.setTextureSize(64, 32);
+ Platform2.mirror = true;
+ setRotation(Platform2, 0F, 0F, 0F);
+ Atachement1 = new ModelRenderer(this, 38, 0);
+ Atachement1.addBox(0F, 0F, 0F, 2, 2, 5);
+ Atachement1.setRotationPoint(-1F, 17F, -12F);
+ Atachement1.setTextureSize(64, 32);
+ Atachement1.mirror = true;
+ setRotation(Atachement1, 0F, 0F, 0F);
+ Atachement2 = new ModelRenderer(this, 38, 0);
+ Atachement2.addBox(0F, 0F, 0F, 2, 2, 5);
+ Atachement2.setRotationPoint(-1F, 17F, 7F);
+ Atachement2.setTextureSize(64, 32);
+ Atachement2.mirror = true;
+ setRotation(Atachement2, 0F, 0F, 0F);
+ Cable1 = new ModelRenderer(this, 29, 0);
+ Cable1.addBox(0F, 0F, 0F, 2, 6, 2);
+ Cable1.setRotationPoint(-1F, 12F, 4.2F);
+ Cable1.setTextureSize(64, 32);
+ Cable1.mirror = true;
+ setRotation(Cable1, 0.2617994F, 0F, 0F);
+ Cable2 = new ModelRenderer(this, 29, 0);
+ Cable2.addBox(0F, 0F, -1F, 2, 6, 2);
+ Cable2.setRotationPoint(-1F, 12F, -5.2F);
+ Cable2.setTextureSize(64, 32);
+ Cable2.mirror = true;
+ setRotation(Cable2, -0.2617994F, 0F, 0F);
+ Cable3 = new ModelRenderer(this, 29, 0);
+ Cable3.addBox(0F, 0F, 0F, 2, 6, 2);
+ Cable3.setRotationPoint(-1F, 23F, -3.9F);
+ Cable3.setTextureSize(64, 32);
+ Cable3.mirror = true;
+ setRotation(Cable3, -2.792527F, 0F, 0F);
+ Cable4 = new ModelRenderer(this, 29, 0);
+ Cable4.addBox(0F, 0F, -1F, 2, 6, 2);
+ Cable4.setRotationPoint(-1F, 23F, 4.9F);
+ Cable4.setTextureSize(64, 32);
+ Cable4.mirror = true;
+ setRotation(Cable4, 2.792527F, 0F, 0F);
+ }
+
+ /**
+ * @param entity
+ * @param f
+ * @param f1
+ * @param f2
+ * @param f3
+ * @param f4
+ * @param f5
+ */
+ @Override
+ public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
+ {
+ Eye.render(f5);
+ Platform1.render(f5);
+ Platform2.render(f5);
+ Atachement1.render(f5);
+ Atachement2.render(f5);
+ Cable1.render(f5);
+ Cable2.render(f5);
+ Cable3.render(f5);
+ Cable4.render(f5);
+ if (entity != null){
+ float x = (float)(f - entity.posX);
+ float y = (float)(f1 - entity.posY);
+ float z = (float)(f2 - entity.posZ);
+ if (f4 == 4){
+ if (f3 == 0) if (z < 0){
+ Eye.rotateAngleY = (float)Math.asin(x / Math.sqrt(x * x + z * z)) + 135f;
+ Eye.rotateAngleZ = (float)-Math.asin((y + 1) / Math.sqrt(y * y + 4 * 4));
+ }else{
+ Eye.rotateAngleY = (float)-Math.asin(x / Math.sqrt(x * x + z * z));
+ Eye.rotateAngleZ = (float)Math.asin((y + 1) / Math.sqrt(y * y + 4 * 4));
+ }
+ if (f3 == 1) if (x < 0){
+ Eye.rotateAngleY = (float)-Math.asin(z / Math.sqrt(x * x + z * z));
+ Eye.rotateAngleZ = (float)Math.asin((y + 1) / Math.sqrt(y * y + 4 * 4));
+ }else{
+ Eye.rotateAngleY = (float)Math.asin(z / Math.sqrt(x * x + z * z)) + 135f;
+ Eye.rotateAngleZ = (float)-Math.asin((y + 1) / Math.sqrt(y * y + 4 * 4));
+ }
+ if (f3 == 2) if (z < 0){
+ Eye.rotateAngleY = (float)Math.asin(x / Math.sqrt(x * x + z * z));
+ Eye.rotateAngleZ = (float)Math.asin((y + 1) / Math.sqrt(y * y + 4 * 4));
+ }else{
+ Eye.rotateAngleY = (float)-Math.asin(x / Math.sqrt(x * x + z * z)) + 135f;
+ Eye.rotateAngleZ = (float)-Math.asin((y + 1) / Math.sqrt(y * y + 4 * 4));
+ }
+ if (f3 == 3) if (x < 0){
+ Eye.rotateAngleY = (float)-Math.asin(z / Math.sqrt(x * x + z * z)) + 135f;
+ Eye.rotateAngleZ = (float)-Math.asin((y + 1) / Math.sqrt(y * y + 4 * 4));
+ }else{
+ Eye.rotateAngleY = (float)Math.asin(z / Math.sqrt(x * x + z * z));
+ Eye.rotateAngleZ = (float)Math.asin((y + 1) / Math.sqrt(y * y + 4 * 4));
+ }
+ }else{
+ Eye.rotateAngleY = 0f;
+ Eye.rotateAngleZ = 0f;
+ }
+ }
+ }
+
+ /**
+ * @param model
+ * @param x
+ * @param y
+ * @param z
+ */
+ private void setRotation(ModelRenderer model, float x, float y, float z)
+ {
+ model.rotateAngleX = x;
+ model.rotateAngleY = y;
+ model.rotateAngleZ = z;
+ }
+}