Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Model not working have no clue why not


nat0875
 Share

Recommended Posts

package net.minecraft.src;

public class ModelNew extends ModelBase
{
  //fields
    ModelRenderer head;
    ModelRenderer body;
    ModelRenderer rightarm;
    ModelRenderer leftarm;
    ModelRenderer rightleg;
    ModelRenderer leftleg;
    ModelRenderer Top_Left_Cage_;
    ModelRenderer Top_Right_Cage;
    ModelRenderer Top_Back_Cage;
    ModelRenderer Middle_Right_Cage;
    ModelRenderer Middle_Left_Cage;
    ModelRenderer Back_Middle_Cage;
    ModelRenderer Back_Bottom_Cage;
    ModelRenderer Bottom_Left_Cage;
    ModelRenderer Bottom_Right_Cage;
    ModelRenderer Top_Front_Cage_Right;
    ModelRenderer Top_Front_Cage_Left;
    ModelRenderer Middle_Front_Cage_Left;
    ModelRenderer Middle_Front_Cage_Right;
    ModelRenderer Bottom_Front_Cage_Right;
    ModelRenderer Bottom_Front_Cage_Left;
    ModelRenderer Neck;
    ModelRenderer 1nd_Top_Left_Cage_;
    ModelRenderer 1nd_Top__Right_Cage;
    ModelRenderer 1nd_Top_Back_Right_Cage;
    ModelRenderer 1nd_Top_Back_Left_Cage;
    ModelRenderer 2nd_Middle_Back_Left_Cage;
    ModelRenderer 2nd_Top_Left_Cage_;
    ModelRenderer 2nd_Middle_Back_Right_Cage;
    ModelRenderer 2nd_Top_Right_Cage_;
  
  public ModelNew()
  {
    textureWidth = 64;
    textureHeight = 64;
    
      head = new ModelRenderer(this, 0, 0);
      head.addBox(-4F, -8F, -4F, 8, 8, 8);
      head.setRotationPoint(0F, 0F, 0F);
      head.setTextureSize(64, 64);
      head.mirror = true;
      setRotation(head, 0F, 0F, 0F);
      body = new ModelRenderer(this, 16, 16);
      body.addBox(-4F, 0F, -2F, 8, 12, 4);
      body.setRotationPoint(0F, 0F, 0F);
      body.setTextureSize(64, 64);
      body.mirror = true;
      setRotation(body, 0F, 0F, 0F);
      rightarm = new ModelRenderer(this, 40, 16);
      rightarm.addBox(-3F, -2F, -2F, 4, 12, 4);
      rightarm.setRotationPoint(-5F, 2F, 0F);
      rightarm.setTextureSize(64, 64);
      rightarm.mirror = true;
      setRotation(rightarm, 0F, 0F, 0F);
      leftarm = new ModelRenderer(this, 40, 16);
      leftarm.addBox(-1F, -2F, -2F, 4, 12, 4);
      leftarm.setRotationPoint(5F, 2F, 0F);
      leftarm.setTextureSize(64, 64);
      leftarm.mirror = true;
      setRotation(leftarm, 0F, 0F, 0F);
      rightleg = new ModelRenderer(this, 0, 16);
      rightleg.addBox(-2F, 0F, -2F, 4, 12, 4);
      rightleg.setRotationPoint(-2F, 12F, 0F);
      rightleg.setTextureSize(64, 64);
      rightleg.mirror = true;
      setRotation(rightleg, 0F, 0F, 0F);
      leftleg = new ModelRenderer(this, 0, 16);
      leftleg.addBox(-2F, 0F, -2F, 4, 12, 4);
      leftleg.setRotationPoint(2F, 12F, 0F);
      leftleg.setTextureSize(64, 64);
      leftleg.mirror = true;
      setRotation(leftleg, 0F, 0F, 0F);
      Top_Left_Cage_ = new ModelRenderer(this, 0, 0);
      Top_Left_Cage_.addBox(0F, 0F, 0F, 1, 2, 17);
      Top_Left_Cage_.setRotationPoint(-11F, 0F, -6F);
      Top_Left_Cage_.setTextureSize(64, 64);
      Top_Left_Cage_.mirror = true;
      setRotation(Top_Left_Cage_, 0F, 0F, 0F);
      Top_Right_Cage = new ModelRenderer(this, 0, 0);
      Top_Right_Cage.addBox(0F, 0F, 0F, 1, 2, 17);
      Top_Right_Cage.setRotationPoint(10F, 0F, -6F);
      Top_Right_Cage.setTextureSize(64, 64);
      Top_Right_Cage.mirror = true;
      setRotation(Top_Right_Cage, 0F, 0F, 0F);
      Top_Back_Cage = new ModelRenderer(this, 0, 0);
      Top_Back_Cage.addBox(0F, 0F, 0F, 22, 2, 1);
      Top_Back_Cage.setRotationPoint(-11F, 0F, 11F);
      Top_Back_Cage.setTextureSize(64, 64);
      Top_Back_Cage.mirror = true;
      setRotation(Top_Back_Cage, 0F, 0F, 0F);
      Middle_Right_Cage = new ModelRenderer(this, 0, 0);
      Middle_Right_Cage.addBox(0F, 0F, 0F, 1, 2, 17);
      Middle_Right_Cage.setRotationPoint(10F, 6F, -6F);
      Middle_Right_Cage.setTextureSize(64, 64);
      Middle_Right_Cage.mirror = true;
      setRotation(Middle_Right_Cage, 0F, 0F, 0F);
      Middle_Left_Cage = new ModelRenderer(this, 0, 0);
      Middle_Left_Cage.addBox(0F, 0F, 0F, 1, 2, 17);
      Middle_Left_Cage.setRotationPoint(-11F, 6F, -6F);
      Middle_Left_Cage.setTextureSize(64, 64);
      Middle_Left_Cage.mirror = true;
      setRotation(Middle_Left_Cage, 0F, 0F, 0F);
      Back_Middle_Cage = new ModelRenderer(this, 0, 0);
      Back_Middle_Cage.addBox(0F, 0F, 0F, 22, 2, 1);
      Back_Middle_Cage.setRotationPoint(-11F, 6F, 11F);
      Back_Middle_Cage.setTextureSize(64, 64);
      Back_Middle_Cage.mirror = true;
      setRotation(Back_Middle_Cage, 0F, 0F, 0F);
      Back_Bottom_Cage = new ModelRenderer(this, 0, 0);
      Back_Bottom_Cage.addBox(0F, 0F, 0F, 22, 2, 1);
      Back_Bottom_Cage.setRotationPoint(-11F, 12F, 11F);
      Back_Bottom_Cage.setTextureSize(64, 64);
      Back_Bottom_Cage.mirror = true;
      setRotation(Back_Bottom_Cage, 0F, 0F, 0F);
      Bottom_Left_Cage = new ModelRenderer(this, 0, 0);
      Bottom_Left_Cage.addBox(0F, 0F, 0F, 1, 2, 17);
      Bottom_Left_Cage.setRotationPoint(-11F, 12F, -6F);
      Bottom_Left_Cage.setTextureSize(64, 64);
      Bottom_Left_Cage.mirror = true;
      setRotation(Bottom_Left_Cage, 0F, 0F, 0F);
      Bottom_Right_Cage = new ModelRenderer(this, 0, 0);
      Bottom_Right_Cage.addBox(0F, 0F, 0F, 1, 2, 17);
      Bottom_Right_Cage.setRotationPoint(10F, 12F, -6F);
      Bottom_Right_Cage.setTextureSize(64, 64);
      Bottom_Right_Cage.mirror = true;
      setRotation(Bottom_Right_Cage, 0F, 0F, 0F);
      Top_Front_Cage_Right = new ModelRenderer(this, 0, 0);
      Top_Front_Cage_Right.addBox(0F, 0F, 0F, 5, 2, 1);
      Top_Front_Cage_Right.setRotationPoint(5F, 0F, -6F);
      Top_Front_Cage_Right.setTextureSize(64, 64);
      Top_Front_Cage_Right.mirror = true;
      setRotation(Top_Front_Cage_Right, 0F, 0F, 0F);
      Top_Front_Cage_Left = new ModelRenderer(this, 0, 0);
      Top_Front_Cage_Left.addBox(0F, 0F, 0F, 5, 2, 1);
      Top_Front_Cage_Left.setRotationPoint(-10F, 0F, -6F);
      Top_Front_Cage_Left.setTextureSize(64, 64);
      Top_Front_Cage_Left.mirror = true;
      setRotation(Top_Front_Cage_Left, 0F, 0F, 0F);
      Middle_Front_Cage_Left = new ModelRenderer(this, 0, 0);
      Middle_Front_Cage_Left.addBox(0F, 0F, 0F, 5, 2, 1);
      Middle_Front_Cage_Left.setRotationPoint(-11F, 6F, -6F);
      Middle_Front_Cage_Left.setTextureSize(64, 64);
      Middle_Front_Cage_Left.mirror = true;
      setRotation(Middle_Front_Cage_Left, 0F, 0F, 0F);
      Middle_Front_Cage_Right = new ModelRenderer(this, 0, 0);
      Middle_Front_Cage_Right.addBox(0F, 0F, 0F, 5, 2, 1);
      Middle_Front_Cage_Right.setRotationPoint(5F, 6F, -6F);
      Middle_Front_Cage_Right.setTextureSize(64, 64);
      Middle_Front_Cage_Right.mirror = true;
      setRotation(Middle_Front_Cage_Right, 0F, 0F, 0F);
      Bottom_Front_Cage_Right = new ModelRenderer(this, 0, 0);
      Bottom_Front_Cage_Right.addBox(0F, 0F, 0F, 6, 2, 1);
      Bottom_Front_Cage_Right.setRotationPoint(5F, 12F, -7F);
      Bottom_Front_Cage_Right.setTextureSize(64, 64);
      Bottom_Front_Cage_Right.mirror = true;
      setRotation(Bottom_Front_Cage_Right, 0F, 0F, 0F);
      Bottom_Front_Cage_Left = new ModelRenderer(this, 0, 0);
      Bottom_Front_Cage_Left.addBox(0F, 0F, 0F, 6, 2, 1);
      Bottom_Front_Cage_Left.setRotationPoint(-11F, 12F, -7F);
      Bottom_Front_Cage_Left.setTextureSize(64, 64);
      Bottom_Front_Cage_Left.mirror = true;
      setRotation(Bottom_Front_Cage_Left, 0F, 0F, 0F);
      Neck.mirror = true;
      Neck = new ModelRenderer(this, 0, 0);
      Neck.addBox(0F, 0F, 0F, 6, 37, 1);
      Neck.setRotationPoint(-3F, -23F, 11.9F);
      Neck.setTextureSize(64, 64);
      Neck.mirror = true;
      setRotation(Neck, 0F, 0F, 0F);
      Neck.mirror = false;
      1nd_Top_Left_Cage_ = new ModelRenderer(this, 0, 0);
      1nd_Top_Left_Cage_.addBox(0F, 0F, 0F, 1, 2, 17);
      1nd_Top_Left_Cage_.setRotationPoint(-17F, -10F, -13.1F);
      1nd_Top_Left_Cage_.setTextureSize(64, 64);
      1nd_Top_Left_Cage_.mirror = true;
      setRotation(1nd_Top_Left_Cage_, 0F, -0.0743572F, 0F);
      1nd_Top__Right_Cage = new ModelRenderer(this, 0, 0);
      1nd_Top__Right_Cage.addBox(0F, 0F, 0F, 1, 2, 17);
      1nd_Top__Right_Cage.setRotationPoint(16F, -10F, -10F);
      1nd_Top__Right_Cage.setTextureSize(64, 64);
      1nd_Top__Right_Cage.mirror = true;
      setRotation(1nd_Top__Right_Cage, 0F, 0.0743572F, 0F);
      1nd_Top_Back_Right_Cage = new ModelRenderer(this, 0, 0);
      1nd_Top_Back_Right_Cage.addBox(0F, 0F, 0F, 1, 2, 17);
      1nd_Top_Back_Right_Cage.setRotationPoint(18F, -10F, 7F);
      1nd_Top_Back_Right_Cage.setTextureSize(64, 64);
      1nd_Top_Back_Right_Cage.mirror = true;
      setRotation(1nd_Top_Back_Right_Cage, 0F, -1.188569F, 0F);
      1nd_Top_Back_Left_Cage = new ModelRenderer(this, 0, 0);
      1nd_Top_Back_Left_Cage.addBox(0F, 0F, 0F, 1, 2, 17);
      1nd_Top_Back_Left_Cage.setRotationPoint(-18F, -10F, 5F);
      1nd_Top_Back_Left_Cage.setTextureSize(64, 64);
      1nd_Top_Back_Left_Cage.mirror = true;
      setRotation(1nd_Top_Back_Left_Cage, 0F, 1.025813F, 0F);
      2nd_Middle_Back_Left_Cage = new ModelRenderer(this, 0, 0);
      2nd_Middle_Back_Left_Cage.addBox(0F, 0F, 0F, 1, 2, 28);
      2nd_Middle_Back_Left_Cage.setRotationPoint(-1F, -25F, 12F);
      2nd_Middle_Back_Left_Cage.setTextureSize(64, 64);
      2nd_Middle_Back_Left_Cage.mirror = true;
      setRotation(2nd_Middle_Back_Left_Cage, 0F, -2.230717F, 0F);
      2nd_Top_Left_Cage_ = new ModelRenderer(this, 0, 0);
      2nd_Top_Left_Cage_.addBox(0F, 0F, 0F, 1, 2, 17);
      2nd_Top_Left_Cage_.setRotationPoint(-23F, -25F, -21F);
      2nd_Top_Left_Cage_.setTextureSize(64, 64);
      2nd_Top_Left_Cage_.mirror = true;
      setRotation(2nd_Top_Left_Cage_, 0F, -0.1487144F, 0F);
      2nd_Middle_Back_Right_Cage = new ModelRenderer(this, 0, 0);
      2nd_Middle_Back_Right_Cage.addBox(0F, 0F, 0F, 1, 2, 28);
      2nd_Middle_Back_Right_Cage.setRotationPoint(2F, -25F, 13F);
      2nd_Middle_Back_Right_Cage.setTextureSize(64, 64);
      2nd_Middle_Back_Right_Cage.mirror = true;
      setRotation(2nd_Middle_Back_Right_Cage, 0F, 2.230723F, 0F);
      2nd_Top_Right_Cage_ = new ModelRenderer(this, 0, 0);
      2nd_Top_Right_Cage_.addBox(0F, 0F, 0F, 1, 2, 17);
      2nd_Top_Right_Cage_.setRotationPoint(23F, -25F, -20F);
      2nd_Top_Right_Cage_.setTextureSize(64, 64);
      2nd_Top_Right_Cage_.mirror = true;
      setRotation(2nd_Top_Right_Cage_, 0F, 0.1115358F, 0F);
  }
  
  public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  {
    super.render(entity, f, f1, f2, f3, f4, f5);
    setRotationAngles(f, f1, f2, f3, f4, f5, entity);
    head.render(f5);
    body.render(f5);
    rightarm.render(f5);
    leftarm.render(f5);
    rightleg.render(f5);
    leftleg.render(f5);
    Top_Left_Cage_.render(f5);
    Top_Right_Cage.render(f5);
    Top_Back_Cage.render(f5);
    Middle_Right_Cage.render(f5);
    Middle_Left_Cage.render(f5);
    Back_Middle_Cage.render(f5);
    Back_Bottom_Cage.render(f5);
    Bottom_Left_Cage.render(f5);
    Bottom_Right_Cage.render(f5);
    Top_Front_Cage_Right.render(f5);
    Top_Front_Cage_Left.render(f5);
    Middle_Front_Cage_Left.render(f5);
    Middle_Front_Cage_Right.render(f5);
    Bottom_Front_Cage_Right.render(f5);
    Bottom_Front_Cage_Left.render(f5);
    Neck.render(f5);
    1nd_Top_Left_Cage_.render(f5);
    1nd_Top__Right_Cage.render(f5);
    1nd_Top_Back_Right_Cage.render(f5);
    1nd_Top_Back_Left_Cage.render(f5);
    2nd_Middle_Back_Left_Cage.render(f5);
    2nd_Top_Left_Cage_.render(f5);
    2nd_Middle_Back_Right_Cage.render(f5);
    2nd_Top_Right_Cage_.render(f5);
  }
  
  private void setRotation(ModelRenderer model, float x, float y, float z)
  {
    model.rotateAngleX = x;
    model.rotateAngleY = y;
    model.rotateAngleZ = z;
  }
  
  public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
  {
    super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  }

}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.