Advertisement
lol123406

Untitled

Apr 29th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.77 KB | None | 0 0
  1. package net.Ethereal.armor;
  2.  
  3. import net.minecraft.client.model.ModelBiped;
  4. import net.minecraft.client.model.ModelRenderer;
  5. import net.minecraft.entity.Entity;
  6.  
  7. public class ArmorModel extends ModelBiped
  8. {
  9.   //fields
  10.     ModelRenderer VisorRight;
  11.     ModelRenderer VisorLeft;
  12.     ModelRenderer VisorLens;
  13.     ModelRenderer VisorButton;
  14.     ModelRenderer ShoulderLeft;
  15.     ModelRenderer ShoulderRight;
  16.  
  17.   public ArmorModel(float expand){
  18.      
  19.       super(expand, 0 ,64, 64);
  20.    
  21.       VisorRight = new ModelRenderer(this, 0, 0);
  22.       VisorRight.addBox(0F, 0F, 0F, 1, 3, 3);
  23.       VisorRight.setRotationPoint(0F, 0F, 0F);
  24.       VisorRight.setTextureSize(64, 64);
  25.       VisorRight.mirror = false;
  26.       setRotation(VisorRight, 0F, 0F, 0F);
  27.      
  28.       VisorLeft = new ModelRenderer(this, 24, 0);
  29.       VisorLeft.addBox(0F, 0F, 0F, 1, 3, 3);
  30.       VisorLeft.setRotationPoint(0F, 0F, 0F);
  31.       VisorLeft.setTextureSize(64, 64);
  32.       VisorLeft.mirror = false;
  33.       setRotation(VisorLeft, 0F, 0F, 0F);
  34.      
  35.       VisorLens = new ModelRenderer(this, 0, 44);
  36.       VisorLens.addBox(0F, 0F, 0F, 10, 2, 2);
  37.       VisorLens.setRotationPoint(0F, 0F, 0F);
  38.       VisorLens.setTextureSize(64, 64);
  39.       VisorLens.mirror = false;
  40.       setRotation(VisorLens, 0F, 0F, 0F);
  41.      
  42.       VisorButton = new ModelRenderer(this, 32, 0);
  43.       VisorButton.addBox(0F, 0F, 0F, 1, 1, 1);
  44.       VisorButton.setRotationPoint(0F, 0F, 0F);
  45.       VisorButton.setTextureSize(64, 64);
  46.       VisorButton.mirror = false;
  47.       setRotation(VisorButton, 0F, 0F, 0F);
  48.      
  49.       ShoulderLeft = new ModelRenderer(this, 24, 32);
  50.       ShoulderLeft.addBox(0F, 0F, 0F, 6, 6, 6);
  51.       ShoulderLeft.setRotationPoint(0F, 0F, 0F);
  52.       ShoulderLeft.setTextureSize(64, 64);
  53.       ShoulderLeft.mirror = false;
  54.       setRotation(ShoulderLeft, 0F, 0F, 0F);
  55.      
  56.       ShoulderRight = new ModelRenderer(this, 0, 32);
  57.       ShoulderRight.addBox(0F, 0F, 0F, 6, 6, 6);
  58.       ShoulderRight.setRotationPoint(0F, 0F, 0F);
  59.       ShoulderRight.setTextureSize(64, 64);
  60.       ShoulderRight.mirror = false;
  61.       setRotation(ShoulderRight, 0F, 0F, 0F);
  62.      
  63.       VisorLens.addChild(VisorLeft);
  64.       VisorLens.addChild(VisorRight);
  65.       VisorLens.addChild(VisorButton);
  66.       this.bipedHead.addChild(VisorLens);
  67.       this.bipedLeftArm.addChild(ShoulderLeft);
  68.       this.bipedRightArm.addChild(ShoulderRight);
  69.   }
  70.  
  71.  
  72.  
  73.   private void setRotation(ModelRenderer model, float x, float y, float z)
  74.   {
  75.     model.rotateAngleX = x;
  76.     model.rotateAngleY = y;
  77.     model.rotateAngleZ = z;
  78.   }
  79.  
  80.   public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
  81.         super.render(entity, f, f1, f2, f3, f4, f5);
  82.         setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  83.       }
  84.  
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement