Guest User

ModelSanglier.java

a guest
Aug 13th, 2013
53
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package nyvelia.proxy;
  2.  
  3. import net.minecraft.client.model.ModelBase;
  4. import net.minecraft.client.model.ModelRenderer;
  5. import net.minecraft.entity.Entity;
  6.  
  7. public class ModelSanglier extends ModelBase
  8. {
  9.   //fields
  10.     ModelRenderer head;
  11.     ModelRenderer body;
  12.     ModelRenderer leg1;
  13.     ModelRenderer leg2;
  14.     ModelRenderer leg3;
  15.     ModelRenderer leg4;
  16.     ModelRenderer Queue;
  17.     ModelRenderer PoilQueue;
  18.     ModelRenderer Groin;
  19.     ModelRenderer DefenseL1;
  20.     ModelRenderer DefenseL2;
  21.     ModelRenderer DefenseR1;
  22.     ModelRenderer DefenseR2;
  23.     ModelRenderer OreilleR;
  24.     ModelRenderer OreilleL;
  25.  
  26.   public ModelSanglier()
  27.   {
  28.     textureWidth = 128;
  29.     textureHeight = 64;
  30.    
  31.       head = new ModelRenderer(this, 49, 20);
  32.       head.addBox(-4F, -4F, -8F, 8, 8, 8);
  33.       head.setRotationPoint(0F, 12F, -6F);
  34.       head.setTextureSize(128, 64);
  35.       head.mirror = true;
  36.       setRotation(head, 0F, 0F, 0F);
  37.       body = new ModelRenderer(this, 0, 20);
  38.       body.addBox(-5F, -10F, -7F, 10, 16, 8);
  39.       body.setRotationPoint(0F, 11F, 3F);
  40.       body.setTextureSize(128, 64);
  41.       body.mirror = true;
  42.       setRotation(body, 1.570796F, 0F, 0F);
  43.       leg1 = new ModelRenderer(this, 0, 44);
  44.       leg1.addBox(-2F, 0F, -2F, 4, 6, 4);
  45.       leg1.setRotationPoint(-3F, 18F, 7F);
  46.       leg1.setTextureSize(128, 64);
  47.       leg1.mirror = true;
  48.       setRotation(leg1, 0F, 0F, 0F);
  49.       leg2 = new ModelRenderer(this, 16, 44);
  50.       leg2.addBox(-2F, 0F, -2F, 4, 6, 4);
  51.       leg2.setRotationPoint(3F, 18F, 7F);
  52.       leg2.setTextureSize(128, 64);
  53.       leg2.mirror = true;
  54.       setRotation(leg2, 0F, 0F, 0F);
  55.       leg3 = new ModelRenderer(this, 0, 54);
  56.       leg3.addBox(-2F, 18F, -2F, 4, 6, 4);
  57.       leg3.setRotationPoint(-3F, 0F, -5F);
  58.       leg3.setTextureSize(128, 64);
  59.       leg3.mirror = true;
  60.       setRotation(leg3, 0F, 0F, 0F);
  61.       leg4 = new ModelRenderer(this, 16, 54);
  62.       leg4.addBox(-2F, 0F, -2F, 4, 6, 4);
  63.       leg4.setRotationPoint(3F, 18F, -5F);
  64.       leg4.setTextureSize(128, 64);
  65.       leg4.mirror = true;
  66.       setRotation(leg4, 0F, 0F, 0F);
  67.       Queue = new ModelRenderer(this, 0, 0);
  68.       Queue.addBox(-0.5F, 0F, -0.5F, 1, 5, 1);
  69.       Queue.setRotationPoint(0F, 12F, 8.4F);
  70.       Queue.setTextureSize(128, 64);
  71.       Queue.mirror = true;
  72.       setRotation(Queue, 0.6981317F, 0F, 0F);
  73.       PoilQueue = new ModelRenderer(this, 5, 0);
  74.       PoilQueue.addBox(-1F, 5F, -1F, 2, 3, 2);
  75.       PoilQueue.setRotationPoint(0F, 12F, 8.4F);
  76.       PoilQueue.setTextureSize(128, 64);
  77.       PoilQueue.mirror = true;
  78.       setRotation(PoilQueue, 0.6981317F, 0F, 0F);
  79.       Groin = new ModelRenderer(this, 58, 36);
  80.       Groin.addBox(-2.5F, -0.5F, -10F, 5, 3, 2);
  81.       Groin.setRotationPoint(0F, 12F, -6F);
  82.       Groin.setTextureSize(128, 64);
  83.       Groin.mirror = true;
  84.       setRotation(Groin, 0F, 0F, 0F);
  85.       DefenseL1 = new ModelRenderer(this, 40, 0);
  86.       DefenseL1.addBox(2.5F, 1.5F, -9.5F, 2, 1, 1);
  87.       DefenseL1.setRotationPoint(0F, 12F, -6F);
  88.       DefenseL1.setTextureSize(128, 64);
  89.       DefenseL1.mirror = true;
  90.       setRotation(DefenseL1, 0F, 0F, 0F);
  91.       DefenseL2 = new ModelRenderer(this, 40, 3);
  92.       DefenseL2.addBox(3.5F, -1F, -9.5F, 1, 3, 1);
  93.       DefenseL2.setRotationPoint(0F, 12F, -6F);
  94.       DefenseL2.setTextureSize(128, 64);
  95.       DefenseL2.mirror = true;
  96.       setRotation(DefenseL2, 0F, 0F, 0F);
  97.       DefenseR1 = new ModelRenderer(this, 34, 0);
  98.       DefenseR1.addBox(-4.5F, 1.5F, -9.5F, 2, 1, 1);
  99.       DefenseR1.setRotationPoint(0F, 12F, -6F);
  100.       DefenseR1.setTextureSize(128, 64);
  101.       DefenseR1.mirror = true;
  102.       setRotation(DefenseR1, 0F, 0F, 0F);
  103.       DefenseR2 = new ModelRenderer(this, 36, 3);
  104.       DefenseR2.addBox(-4.5F, -1F, -9.5F, 1, 3, 1);
  105.       DefenseR2.setRotationPoint(0F, 12F, -6F);
  106.       DefenseR2.setTextureSize(128, 64);
  107.       DefenseR2.mirror = true;
  108.       setRotation(DefenseR2, 0F, 0F, 0F);
  109.       OreilleR = new ModelRenderer(this, 51, 24);
  110.       OreilleR.addBox(-3F, -8F, -2F, 3, 4, 0);
  111.       OreilleR.setRotationPoint(0F, 12F, -6F);
  112.       OreilleR.setTextureSize(128, 64);
  113.       OreilleR.mirror = true;
  114.       setRotation(OreilleR, 0F, 0F, -0.3490659F);
  115.       OreilleL = new ModelRenderer(this, 73, 24);
  116.       OreilleL.addBox(0F, -7.8F, -2F, 3, 4, 0);
  117.       OreilleL.setRotationPoint(0F, 12F, -6F);
  118.       OreilleL.setTextureSize(128, 64);
  119.       OreilleL.mirror = true;
  120.       setRotation(OreilleL, 0F, 0F, 0.3490659F);
  121.   }
  122.  
  123.   public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  124.   {
  125.     super.render(entity, f, f1, f2, f3, f4, f5);
  126.     setRotationAngles(f, f1, f2, f3, f4, f5);
  127.     head.render(f5);
  128.     body.render(f5);
  129.     leg1.render(f5);
  130.     leg2.render(f5);
  131.     leg3.render(f5);
  132.     leg4.render(f5);
  133.     Queue.render(f5);
  134.     PoilQueue.render(f5);
  135.     Groin.render(f5);
  136.     DefenseL1.render(f5);
  137.     DefenseL2.render(f5);
  138.     DefenseR1.render(f5);
  139.     DefenseR2.render(f5);
  140.     OreilleR.render(f5);
  141.     OreilleL.render(f5);
  142.   }
  143.  
  144.   private void setRotation(ModelRenderer model, float x, float y, float z)
  145.   {
  146.     model.rotateAngleX = x;
  147.     model.rotateAngleY = y;
  148.     model.rotateAngleZ = z;
  149.   }
  150.  
  151.   public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
  152.   {
  153.     super.setRotationAngles(f, f1, f2, f3, f4, f5, null);
  154.   }
  155.  
  156. }
RAW Paste Data