SHARE
TWEET

ModelChevalier

a guest Mar 1st, 2014 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package modendercraft;
  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 ModelChevalier extends ModelBase
  8. {
  9.   //fields
  10.     ModelRenderer head;
  11.     ModelRenderer body;
  12.     ModelRenderer rightarm;
  13.     ModelRenderer leftarm;
  14.     ModelRenderer rightleg;
  15.     ModelRenderer leftleg;
  16.     ModelRenderer Casque;
  17.     ModelRenderer partie_1;
  18.     ModelRenderer Partie_2;
  19.     ModelRenderer partie_3;
  20.     ModelRenderer partie_4;
  21.     ModelRenderer partie_5;
  22.     ModelRenderer partie_6;
  23.     ModelRenderer partie_7;
  24.  
  25.   public ModelChevalier()
  26.   {
  27.     textureWidth = 128;
  28.     textureHeight = 32;
  29.    
  30.       head = new ModelRenderer(this, 0, 0);
  31.       head.addBox(-4F, -8F, -4F, 8, 8, 8);
  32.       head.setRotationPoint(0F, 0F, 0F);
  33.       head.setTextureSize(128, 32);
  34.       head.mirror = true;
  35.       setRotation(head, 0F, 0F, 0F);
  36.       body = new ModelRenderer(this, 16, 16);
  37.       body.addBox(-4F, 0F, -2F, 8, 12, 4);
  38.       body.setRotationPoint(0F, 0F, 0F);
  39.       body.setTextureSize(128, 32);
  40.       body.mirror = true;
  41.       setRotation(body, 0F, 0F, 0F);
  42.       rightarm = new ModelRenderer(this, 40, 16);
  43.       rightarm.addBox(-3F, -2F, -2F, 4, 12, 4);
  44.       rightarm.setRotationPoint(-5F, 2F, 0F);
  45.       rightarm.setTextureSize(128, 32);
  46.       rightarm.mirror = true;
  47.       setRotation(rightarm, 0F, 0F, 0F);
  48.       leftarm = new ModelRenderer(this, 40, 16);
  49.       leftarm.addBox(-1F, -2F, -2F, 4, 12, 4);
  50.       leftarm.setRotationPoint(5F, 2F, 0F);
  51.       leftarm.setTextureSize(128, 32);
  52.       leftarm.mirror = true;
  53.       setRotation(leftarm, 0F, 0F, 0F);
  54.       rightleg = new ModelRenderer(this, 0, 16);
  55.       rightleg.addBox(-2F, 0F, -2F, 4, 12, 4);
  56.       rightleg.setRotationPoint(-2F, 12F, 0F);
  57.       rightleg.setTextureSize(128, 32);
  58.       rightleg.mirror = true;
  59.       setRotation(rightleg, 0F, 0F, 0F);
  60.       leftleg = new ModelRenderer(this, 0, 16);
  61.       leftleg.addBox(-2F, 0F, -2F, 4, 12, 4);
  62.       leftleg.setRotationPoint(2F, 12F, 0F);
  63.       leftleg.setTextureSize(128, 32);
  64.       leftleg.mirror = true;
  65.       setRotation(leftleg, 0F, 0F, 0F);
  66.       Casque = new ModelRenderer(this, 32, 0);
  67.       Casque.addBox(0F, 0F, 0F, 8, 8, 8);
  68.       Casque.setRotationPoint(-4F, -8F, -4F);
  69.       Casque.setTextureSize(128, 32);
  70.       Casque.mirror = true;
  71.       setRotation(Casque, 0F, 0F, 0F);
  72.       partie_1 = new ModelRenderer(this, 90, 10);
  73.       partie_1.addBox(0F, 0F, 0F, 1, 1, 1);
  74.       partie_1.setRotationPoint(8F, 3F, 3F);
  75.       partie_1.setTextureSize(128, 32);
  76.       partie_1.mirror = true;
  77.       setRotation(partie_1, 0F, 0F, 0F);
  78.       Partie_2 = new ModelRenderer(this, 90, 8);
  79.       Partie_2.addBox(0F, 0F, 0F, 1, 1, 2);
  80.       Partie_2.setRotationPoint(8F, 4F, 2F);
  81.       Partie_2.setTextureSize(128, 32);
  82.       Partie_2.mirror = true;
  83.       setRotation(Partie_2, 0F, 0F, 0F);
  84.       partie_3 = new ModelRenderer(this, 88, 9);
  85.       partie_3.addBox(0F, 0F, 0F, 1, 1, 1);
  86.       partie_3.setRotationPoint(8F, 3F, -4F);
  87.       partie_3.setTextureSize(128, 32);
  88.       partie_3.mirror = true;
  89.       setRotation(partie_3, 0F, 0F, 0F);
  90.       partie_4.mirror = true;
  91.       partie_4 = new ModelRenderer(this, 70, 15);
  92.       partie_4.addBox(0F, 0F, 0F, 1, 8, 8);
  93.       partie_4.setRotationPoint(8F, 5F, -4F);
  94.       partie_4.setTextureSize(128, 32);
  95.       partie_4.mirror = true;
  96.       setRotation(partie_4, 0F, 0F, 0F);
  97.       partie_4.mirror = false;
  98.       partie_5 = new ModelRenderer(this, 90, 10);
  99.       partie_5.addBox(0F, 0F, 0F, 1, 1, 2);
  100.       partie_5.setRotationPoint(8F, 4F, -4F);
  101.       partie_5.setTextureSize(128, 32);
  102.       partie_5.mirror = true;
  103.       setRotation(partie_5, 0F, 0F, 0F);
  104.       partie_6 = new ModelRenderer(this, 92, 18);
  105.       partie_6.addBox(0F, 0F, 0F, 1, 1, 6);
  106.       partie_6.setRotationPoint(8F, 13F, -3F);
  107.       partie_6.setTextureSize(128, 32);
  108.       partie_6.mirror = true;
  109.       setRotation(partie_6, 0F, 0F, 0F);
  110.       partie_7 = new ModelRenderer(this, 91, 6);
  111.       partie_7.addBox(0F, 0F, 0F, 1, 1, 4);
  112.       partie_7.setRotationPoint(8F, 14F, -2F);
  113.       partie_7.setTextureSize(128, 32);
  114.       partie_7.mirror = true;
  115.       setRotation(partie_7, 0F, 0F, 0F);
  116.   }
  117.  
  118.   public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  119.   {
  120.     super.render(entity, f, f1, f2, f3, f4, f5);
  121.     setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  122.     head.render(f5);
  123.     body.render(f5);
  124.     rightarm.render(f5);
  125.     leftarm.render(f5);
  126.     rightleg.render(f5);
  127.     leftleg.render(f5);
  128.     Casque.render(f5);
  129.     partie_1.render(f5);
  130.     Partie_2.render(f5);
  131.     partie_3.render(f5);
  132.     partie_4.render(f5);
  133.     partie_5.render(f5);
  134.     partie_6.render(f5);
  135.     partie_7.render(f5);
  136.   }
  137.  
  138.   private void setRotation(ModelRenderer model, float x, float y, float z)
  139.   {
  140.     model.rotateAngleX = x;
  141.     model.rotateAngleY = y;
  142.     model.rotateAngleZ = z;
  143.   }
  144.  
  145.   public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
  146.   {
  147.     super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  148.   }
  149.  
  150. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top