TheGoldCrayon

ModelDjinn

Apr 2nd, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 7.51 KB | None | 0 0
  1. package com.TheGoldCrayon.Daemonology.client.model;
  2.  
  3. import net.minecraft.client.model.ModelBase;
  4. import net.minecraft.client.model.ModelRenderer;
  5. import net.minecraft.entity.Entity;
  6. import net.minecraft.util.MathHelper;
  7.  
  8. public class ModelDjinn extends ModelBase
  9. {
  10.     ModelRenderer head = new ModelRenderer(this, 0, 0);
  11.     ModelRenderer body;
  12.     ModelRenderer rightarm;
  13.     ModelRenderer leftarm;
  14.     ModelRenderer lefthorn1;
  15.     ModelRenderer lefthorn2;
  16.     ModelRenderer lefthorn3;
  17.     ModelRenderer lefthorn4;
  18.     ModelRenderer lefthorn5;
  19.     ModelRenderer lefthorn6;
  20.     ModelRenderer lefthorn7;
  21.     ModelRenderer lefthorn8;
  22.     ModelRenderer lefthorn9;
  23.     ModelRenderer lefthorn10;
  24.     ModelRenderer righthorn1;
  25.     ModelRenderer righthorn2;
  26.     ModelRenderer righthorn3;
  27.     ModelRenderer righthorn4;
  28.     ModelRenderer righthorn5;
  29.     ModelRenderer righthorn6;
  30.     ModelRenderer righthorn7;
  31.     ModelRenderer righthorn8;
  32.     ModelRenderer righthorn9;
  33.     ModelRenderer righthorn10;
  34.     ModelRenderer cloud1;
  35.     ModelRenderer cloud2;
  36.     ModelRenderer cloud3;
  37.     ModelRenderer cloud4;
  38.  
  39.     public ModelDjinn()
  40.     {
  41.         textureWidth = 64;
  42.         textureHeight = 64;
  43.        
  44.         this.head = new ModelRenderer(this, 0, 5);
  45.         this.head.addBox(-4F, -8F, -4F, 8, 8, 8);
  46.         this.head.setRotationPoint(0F, 0F, 0F);
  47.        
  48.         this.body = new ModelRenderer(this, 0, 22);
  49.         this.body.addBox(-4F, -2F, -17F, 8, 4, 17);
  50.         this.body.setRotationPoint(0F, 0F, 0F);
  51.        
  52.         this.rightarm = new ModelRenderer(this, 33, 0);
  53.         this.rightarm.addBox(-3F, -2F, -2F, 4, 12, 4);
  54.         this.rightarm.setRotationPoint(-5F, 2F, 0F);
  55.    
  56.         this.leftarm = new ModelRenderer(this, 33, 0);
  57.         this.leftarm.addBox(-1F, -2F, -2F, 4, 12, 4);
  58.         this.leftarm.setRotationPoint(5F, 2F, 0F);
  59.    
  60.         this.lefthorn1 = new ModelRenderer(this, 5, 0);
  61.         this.lefthorn1.addBox(1F, -4F, -9F, 2, 2, 2);
  62.         this.lefthorn1.setRotationPoint(0F, 0F, 0F);
  63.         this.lefthorn1.rotateAngleX = -0.7853982F;
  64.  
  65.         this.lefthorn2 = new ModelRenderer(this, 5, 0);
  66.         this.lefthorn2.addBox(1F, -1.2F, -11F, 2, 2, 2);
  67.         this.lefthorn2.setRotationPoint(0F, 0F, 0F);
  68.         this.lefthorn2.rotateAngleX = -1.099557F;
  69.        
  70.         this.lefthorn3 = new ModelRenderer(this, 5, 0);
  71.         this.lefthorn3.addBox(1F, 2.1F, -12F, 2, 2, 2);
  72.         this.lefthorn3.setRotationPoint(0F, 0F, 0F);
  73.         this.lefthorn3.rotateAngleX = -1.413717F;
  74.  
  75.         this.lefthorn4 = new ModelRenderer(this, 5, 0);
  76.         this.lefthorn4.addBox(1F, 5.6F, -12.2F, 2, 2, 2);
  77.         this.lefthorn4.setRotationPoint(0F, 0F, 0F);
  78.         this.lefthorn4.rotateAngleX = -1.727876F;
  79.  
  80.         this.lefthorn5 = new ModelRenderer(this, 5, 0);
  81.         this.lefthorn5.addBox(1F, 9F, -11.3F, 2, 2, 2);
  82.         this.lefthorn5.setRotationPoint(0F, 0F, 0F);
  83.         this.lefthorn5.rotateAngleX = -2.042035F;
  84.  
  85.         this.lefthorn6 = new ModelRenderer(this, 0, 0);
  86.         this.lefthorn6.addBox(1.5F, 11.2F, -10.5F, 1, 1, 1);
  87.         this.lefthorn6.setRotationPoint(0F, 0F, 0F);
  88.         this.lefthorn6.rotateAngleX = -2.199115F;
  89.  
  90.         this.lefthorn7 = new ModelRenderer(this, 0, 0);
  91.         this.lefthorn7.addBox(1.5F, 12.7F, -9.42F, 1, 1, 1);
  92.         this.lefthorn7.setRotationPoint(0F, 0F, 0F);
  93.         this.lefthorn7.rotateAngleX = -2.356194F;
  94.        
  95.         this.lefthorn8 = new ModelRenderer(this, 0, 0);
  96.         this.lefthorn8.addBox(1.5F, 14F, -8F, 1, 1, 1);
  97.         this.lefthorn8.setRotationPoint(0F, 0F, 0F);
  98.         this.lefthorn8.rotateAngleX = -2.513274F;
  99.  
  100.         this.lefthorn9 = new ModelRenderer(this, 0, 0);
  101.         this.lefthorn9.addBox(1.5F, 15.1F, -6.5F, 1, 1, 1);
  102.         this.lefthorn9.setRotationPoint(0F, 0F, 0F);
  103.         this.lefthorn9.rotateAngleX = -2.670354F;
  104.  
  105.         this.lefthorn10 = new ModelRenderer(this, 0, 0);
  106.         this.lefthorn10.addBox(1.5F, 15.9F, -4.9F, 1, 1, 1);
  107.         this.lefthorn10.setRotationPoint(0F, 0F, 0F);
  108.         this.lefthorn10.rotateAngleX = -2.827433F;
  109.  
  110.         this.righthorn1 = new ModelRenderer(this, 5, 0);
  111.         this.righthorn1.addBox(-3F, -4F, -9F, 2, 2, 2);
  112.         this.righthorn1.setRotationPoint(0F, 0F, 0F);
  113.         this.righthorn1.rotateAngleX = -0.7853982F;
  114.        
  115.         this.righthorn2 = new ModelRenderer(this, 5, 0);
  116.         this.righthorn2.addBox(-3F, -1.2F, -11F, 2, 2, 2);
  117.         this.righthorn2.setRotationPoint(0F, 0F, 0F);
  118.         this.righthorn2.rotateAngleX = -1.099557F;
  119.  
  120.         this.righthorn3 = new ModelRenderer(this, 5, 0);
  121.         this.righthorn3.addBox(-3F, 2.1F, -12F, 2, 2, 2);
  122.         this.righthorn3.setRotationPoint(0F, 0F, 0F);
  123.         this.righthorn3.rotateAngleX = -1.413717F;
  124.  
  125.         this.righthorn4 = new ModelRenderer(this, 5, 0);
  126.         this.righthorn4.addBox(-3F, 5.6F, -12.2F, 2, 2, 2);
  127.         this.righthorn4.setRotationPoint(0F, 0F, 0F);
  128.         this.righthorn4.rotateAngleX = -1.727876F;
  129.  
  130.         this.righthorn5 = new ModelRenderer(this, 5, 0);
  131.         this.righthorn5.addBox(-3F, 9F, -11.3F, 2, 2, 2);
  132.         this.righthorn5.setRotationPoint(0F, 0F, 0F);
  133.         this.righthorn5.rotateAngleX = -2.042035F;
  134.  
  135.         this.righthorn6 = new ModelRenderer(this, 0, 0);
  136.         this.righthorn6.addBox(-2.5F, 11.2F, -10.5F, 1, 1, 1);
  137.         this.righthorn6.setRotationPoint(0F, 0F, 0F);
  138.         this.righthorn6.rotateAngleX = -2.199115F;
  139.  
  140.         this.righthorn7 = new ModelRenderer(this, 0, 0);
  141.         this.righthorn7.addBox(-2.5F, 12.7F, -9.42F, 1, 1, 1);
  142.         this.righthorn7.setRotationPoint(0F, 0F, 0F);
  143.         this.righthorn7.rotateAngleX = -2.356194F;
  144.  
  145.         this.righthorn8 = new ModelRenderer(this, 0, 0);
  146.         this.righthorn8.addBox(-2.5F, 14F, -8F, 1, 1, 1);
  147.         this.righthorn8.setRotationPoint(0F, 0F, 0F);
  148.         this.righthorn8.rotateAngleX = -2.513274F;
  149.  
  150.         this.righthorn9 = new ModelRenderer(this, 0, 0);
  151.         this.righthorn9.addBox(-2.5F, 15.1F, -6.5F, 1, 1, 1);
  152.         this.righthorn9.setRotationPoint(0F, 0F, 0F);
  153.         this.righthorn9.rotateAngleX = -2.670354F;
  154.  
  155.         this.righthorn10 = new ModelRenderer(this, 0, 0);
  156.         this.righthorn10.addBox(-2.5F, 15.9F, -4.9F, 1, 1, 1);
  157.         this.righthorn10.setRotationPoint(0F, 0F, 0F);
  158.         this.righthorn10.rotateAngleX = -2.827433F;
  159.  
  160.         this.cloud1 = new ModelRenderer(this, 0, 46);
  161.         this.cloud1.addBox(-7F, 18F, -6F, 14, 5, 12);
  162.         this.cloud1.setRotationPoint(0F, 0F, 0F);
  163.        
  164.         this.cloud2 = new ModelRenderer(this, 0, 46);
  165.         this.cloud2.addBox(-6F, 17F, -5F, 12, 7, 10);
  166.         this.cloud2.setRotationPoint(0F, 0F, 0F);
  167.        
  168.         this.cloud3 = new ModelRenderer(this, 0, 46);
  169.         this.cloud3.addBox(-7F, 19F, -7F, 14, 3, 14);
  170.         this.cloud3.setRotationPoint(0F, 0F, 0F);
  171.        
  172.         this.cloud4 = new ModelRenderer(this, 0, 46);
  173.         this.cloud4.addBox(-8F, 19F, -6F, 16, 3, 12);
  174.         this.cloud4.setRotationPoint(0F, 0F, 0F);
  175.        
  176.     }
  177.    
  178.     public void setRotationAngles(float time, float limbSwingDistance, float p_78087_3_, float headYRot, float headXRot, float p_78087_6_, Entity entity)
  179.     {
  180.         this.head.rotateAngleX = headXRot / (180F / (float)Math.PI);
  181.         this.head.rotateAngleY = headYRot / (180F / (float)Math.PI);
  182.        
  183.         this.body.rotateAngleX = ((float)Math.PI / 2.0F);
  184.        
  185.         this.leftarm.rotateAngleX = MathHelper.cos(time * 0.6662F) * 1.4F * limbSwingDistance;
  186.         this.rightarm.rotateAngleX = MathHelper.cos(time * .6662F + (float)Math.PI) * 1.4F * limbSwingDistance;
  187.        
  188.     }
  189.    
  190. }
Add Comment
Please, Sign In to add comment