Advertisement
Guest User

ModelFarmer

a guest
Aug 16th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.48 KB | None | 0 0
  1. public class ModelFarmer extends ModelBase {
  2.     public ModelRenderer Base;
  3.     public ModelRenderer Pole;
  4.     public ModelRenderer Ymov;
  5.     public ModelRenderer Arm1;
  6.     public ModelRenderer Arm2;
  7.     public ModelRenderer Head1;
  8.     public ModelRenderer Head2;
  9.     public ModelRenderer Head3;
  10.  
  11.     public ModelFarmer() {
  12.         this.textureWidth = 64;
  13.         this.textureHeight = 128;
  14.         this.Ymov = new ModelRenderer(this, 25, 33);
  15.         this.Ymov.setRotationPoint(0.0F, -18.5F, 0.0F);
  16.         this.Ymov.addBox(-4.0F, -3.0F, -4.0F, 8, 7, 8, 0.0F);
  17.         this.Head1 = new ModelRenderer(this, 0, 72);
  18.         this.Head1.setRotationPoint(0.0F, 0.0F, -12.0F);
  19.         this.Head1.addBox(-3.0F, -3.0F, -6.0F, 6, 7, 6, 0.0F);
  20.         this.Arm1 = new ModelRenderer(this, 25, 49);
  21.         this.Arm1.setRotationPoint(0.0F, -18.0F, 0.0F);
  22.         this.Arm1.addBox(-2.5F, -2.5F, -16.0F, 5, 5, 14, 0.0F);
  23.         this.Base = new ModelRenderer(this, 0, 0);
  24.         this.Base.setRotationPoint(0.0F, 16.0F, 0.0F);
  25.         this.Base.addBox(-8.0F, -8.0F, -8.0F, 16, 16, 16, 0.0F);
  26.         this.Head3 = new ModelRenderer(this, 12, 86);
  27.         this.Head3.setRotationPoint(0.0F, 5.0F, 0.0F);
  28.         this.Head3.addBox(-0.5F, 0.0F, -0.5F, 1, 4, 1, 0.0F);
  29.         this.Arm2 = new ModelRenderer(this, 25, 69);
  30.         this.Arm2.setRotationPoint(0.0F, 0.0F, -16.0F);
  31.         this.Arm2.addBox(-2.0F, -2.0F, -12.0F, 4, 4, 12, 0.0F);
  32.         this.Head2 = new ModelRenderer(this, -1, 86);
  33.         this.Head2.setRotationPoint(0.0F, 4.0F, -3.0F);
  34.         this.Head2.addBox(-1.5F, 0.0F, -1.5F, 3, 5, 3, 0.0F);
  35.         this.Pole = new ModelRenderer(this, 0, 33);
  36.         this.Pole.setRotationPoint(0.0F, 8.0F, 0.0F);
  37.         this.Pole.addBox(-3.0F, -32.0F, -3.0F, 6, 32, 6, 0.0F);
  38.         this.Arm2.addChild(this.Head1);
  39.         this.Head2.addChild(this.Head3);
  40.         this.Arm1.addChild(this.Arm2);
  41.         this.Head1.addChild(this.Head2);
  42.     }
  43.  
  44.     @Override
  45.     public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
  46.         this.Base.render(f5);
  47.         this.Pole.render(f5);
  48.         this.Ymov.render(f5);
  49.         this.Arm1.render(f5);
  50.     }
  51.  
  52.     /**
  53.      * This is a helper function from Tabula to set the rotation of model parts
  54.      */
  55.     public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
  56.         modelRenderer.rotateAngleX = x;
  57.         modelRenderer.rotateAngleY = y;
  58.         modelRenderer.rotateAngleZ = z;
  59.     }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement