summaryrefslogtreecommitdiff
path: root/java/darkknight/jewelrycraft/model/ModelShadowEye.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/darkknight/jewelrycraft/model/ModelShadowEye.java')
-rw-r--r--java/darkknight/jewelrycraft/model/ModelShadowEye.java112
1 files changed, 49 insertions, 63 deletions
diff --git a/java/darkknight/jewelrycraft/model/ModelShadowEye.java b/java/darkknight/jewelrycraft/model/ModelShadowEye.java
index 3f48b79..e396f72 100644
--- a/java/darkknight/jewelrycraft/model/ModelShadowEye.java
+++ b/java/darkknight/jewelrycraft/model/ModelShadowEye.java
@@ -3,15 +3,11 @@
// 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;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.boss.EntityWither;
-import net.minecraft.util.MathHelper;
public class ModelShadowEye extends ModelBase
{
@@ -27,11 +23,13 @@ public class ModelShadowEye extends ModelBase
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);
@@ -88,6 +86,16 @@ public class ModelShadowEye extends ModelBase
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);
@@ -99,74 +107,52 @@ public class ModelShadowEye extends ModelBase
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 (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 == 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 == 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)));
- }
+ 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
- {
+ }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;