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

Entity Model ERROR


NaxotronDE
 Share

Recommended Posts

Hey guys at first I want to say that I'm German... so my English is not very good. ;-)

I have a problem with my ModelScorpion.java file!

I start the game and then it says: "AL lib: (EE) alc_cleanup: 1 device not closed".

I don't know why this happens, but later I've tried it with the right legs and without the left legs, right arm,.... and that worked.

I don't understand that!

Please let me know if you have any solution.

Theres the code:

 

package sumba.models;

 

import net.minecraft.client.model.ModelBase;

import net.minecraft.client.model.ModelRenderer;

import net.minecraft.entity.Entity;

 

public class ModelScorpion extends ModelBase {

 

    ModelRenderer body;

    ModelRenderer RightLegA;

    ModelRenderer RightLegB;

    ModelRenderer RightLegC;

    ModelRenderer RightLegD;

    ModelRenderer LeftLegA;

    ModelRenderer LeftLegB;

    ModelRenderer LeftLegC;

    ModelRenderer LeftLegD;

    ModelRenderer RightArmA;

    ModelRenderer RightArmB;

    ModelRenderer RightArmC;

    ModelRenderer RightArmD;

    ModelRenderer LeftArmA;

    ModelRenderer LeftArmB;

    ModelRenderer LeftArmC;

    ModelRenderer LeftArmD;

    ModelRenderer Tail1;

    ModelRenderer Tail2;

    ModelRenderer Tail3;

    ModelRenderer Tail4;

    ModelRenderer sting;

 

  public ModelScorpion() {

 

    textureWidth = 64;

    textureHeight = 32;

   

      body = new ModelRenderer(this, 30, 18);

      body.addBox(0F, 0F, 0F, 6, 3, 11);

      body.setRotationPoint(-3F, 20F, -5F);

      body.setTextureSize(64, 32);

      body.mirror = true;

      setRotation(body, 0F, 0F, 0F);

      RightLegA = new ModelRenderer(this, 54, 16);

      RightLegA.addBox(-4F, -0.5F, -0.5F, 4, 1, 1);

      RightLegA.setRotationPoint(-3F, 22.5F, 4.5F);

      RightLegA.setTextureSize(64, 32);

      RightLegA.mirror = true;

      setRotation(RightLegA, 0F, 0.3490659F, -0.2268928F);

      RightLegB = new ModelRenderer(this, 54, 14);

      RightLegB.addBox(-4F, -0.5F, -0.5F, 4, 1, 1);

      RightLegB.setRotationPoint(-3F, 22.5F, 2.5F);

      RightLegB.setTextureSize(64, 32);

      RightLegB.mirror = true;

      setRotation(RightLegB, 0F, 0.0872665F, -0.2268928F);

      RightLegC = new ModelRenderer(this, 54, 12);

      RightLegC.addBox(-4F, -0.5F, -0.5F, 4, 1, 1);

      RightLegC.setRotationPoint(-3F, 22.5F, 0.5F);

      RightLegC.setTextureSize(64, 32);

      RightLegC.mirror = true;

      setRotation(RightLegC, 0F, -0.0872665F, -0.2268928F);

      RightLegD = new ModelRenderer(this, 54, 10);

      RightLegD.addBox(-4F, -0.5F, -0.5F, 4, 1, 1);

      RightLegD.setRotationPoint(-3F, 22.5F, -1.5F);

      RightLegD.setTextureSize(64, 32);

      RightLegD.mirror = true;

      setRotation(RightLegD, 0F, -0.3490659F, -0.2268928F);

      LeftLegA.mirror = true;

      LeftLegA = new ModelRenderer(this, 54, 2);

      LeftLegA.addBox(0F, -0.5F, -0.5F, 4, 1, 1);

      LeftLegA.setRotationPoint(3F, 22.5F, 4.5F);

      LeftLegA.setTextureSize(64, 32);

      LeftLegA.mirror = true;

      setRotation(LeftLegA, 0F, -0.3490659F, 0.2268928F);

      LeftLegA.mirror = false;

      LeftLegB.mirror = true;

      LeftLegB = new ModelRenderer(this, 54, 4);

      LeftLegB.addBox(0F, -0.5F, -0.5F, 4, 1, 1);

      LeftLegB.setRotationPoint(3F, 22.5F, 2.5F);

      LeftLegB.setTextureSize(64, 32);

      LeftLegB.mirror = true;

      setRotation(LeftLegB, 0F, -0.0872665F, 0.2268928F);

      LeftLegB.mirror = false;

      LeftLegC.mirror = true;

      LeftLegC = new ModelRenderer(this, 54, 6);

      LeftLegC.addBox(0F, -0.5F, -0.5F, 4, 1, 1);

      LeftLegC.setRotationPoint(3F, 22.5F, 0.5F);

      LeftLegC.setTextureSize(64, 32);

      LeftLegC.mirror = true;

      setRotation(LeftLegC, 0F, 0.0872665F, 0.2268928F);

      LeftLegC.mirror = false;

      LeftLegD.mirror = true;

      LeftLegD = new ModelRenderer(this, 54, 8);

      LeftLegD.addBox(0F, -0.5F, -0.5F, 4, 1, 1);

      LeftLegD.setRotationPoint(3F, 22.5F, -1.5F);

      LeftLegD.setTextureSize(64, 32);

      LeftLegD.mirror = true;

      setRotation(LeftLegD, 0F, 0.3490659F, 0.2268928F);

      LeftLegD.mirror = false;

      RightArmA = new ModelRenderer(this, 12, 30);

      RightArmA.addBox(-3F, -0.5F, -0.5F, 3, 1, 1);

      RightArmA.setRotationPoint(-3F, 21.5F, -3.5F);

      RightArmA.setTextureSize(64, 32);

      RightArmA.mirror = true;

      setRotation(RightArmA, 0F, -0.7853982F, 0.1570796F);

      RightArmB = new ModelRenderer(this, 12, 23);

      RightArmB.addBox(-3.5F, -1F, -4.5F, 2, 2, 3);

      RightArmB.setRotationPoint(-3F, 21.5F, -3.5F);

      RightArmB.setTextureSize(64, 32);

      RightArmB.mirror = true;

      setRotation(RightArmB, 0F, 0F, 0.1570796F);

      RightArmC = new ModelRenderer(this, 12, 14);

      RightArmC.addBox(-4F, -0.5F, -6.5F, 1, 1, 3);

      RightArmC.setRotationPoint(-3F, 21.5F, -3.5F);

      RightArmC.setTextureSize(64, 32);

      RightArmC.mirror = true;

      setRotation(RightArmC, 0F, 0F, 0.1570796F);

      RightArmD = new ModelRenderer(this, 12, 6);

      RightArmD.addBox(-2F, -0.5F, -6.5F, 1, 1, 3);

      RightArmD.setRotationPoint(-3F, 21.5F, -3.5F);

      RightArmD.setTextureSize(64, 32);

      RightArmD.mirror = true;

      setRotation(RightArmD, 0F, 0F, 0.1570796F);

      LeftArmA.mirror = true;

      LeftArmA = new ModelRenderer(this, 12, 28);

      LeftArmA.addBox(0F, -0.5F, -0.5F, 3, 1, 1);

      LeftArmA.setRotationPoint(3F, 21.5F, -3.5F);

      LeftArmA.setTextureSize(64, 32);

      LeftArmA.mirror = true;

      setRotation(LeftArmA, 0F, 0.7853982F, -0.1570796F);

      LeftArmA.mirror = false;

      LeftArmB.mirror = true;

      LeftArmB = new ModelRenderer(this, 12, 18);

      LeftArmB.addBox(1.5F, -1F, -4.5F, 2, 2, 3);

      LeftArmB.setRotationPoint(3F, 21.5F, -3.5F);

      LeftArmB.setTextureSize(64, 32);

      LeftArmB.mirror = true;

      setRotation(LeftArmB, 0F, 0F, -0.1570796F);

      LeftArmB.mirror = false;

      LeftArmC.mirror = true;

      LeftArmC = new ModelRenderer(this, 12, 10);

      LeftArmC.addBox(3F, -0.5F, -6.5F, 1, 1, 3);

      LeftArmC.setRotationPoint(3F, 21.5F, -3.5F);

      LeftArmC.setTextureSize(64, 32);

      LeftArmC.mirror = true;

      setRotation(LeftArmC, 0F, 0F, -0.1570796F);

      LeftArmC.mirror = false;

      LeftArmD.mirror = true;

      LeftArmD = new ModelRenderer(this, 12, 2);

      LeftArmD.addBox(1F, -0.5F, -6.5F, 1, 1, 3);

      LeftArmD.setRotationPoint(3F, 21.5F, -3.5F);

      LeftArmD.setTextureSize(64, 32);

      LeftArmD.mirror = true;

      setRotation(LeftArmD, 0F, 0F, -0.1570796F);

      LeftArmD.mirror = false;

      Tail1 = new ModelRenderer(this, 0, 26);

      Tail1.addBox(-1F, -1F, 0F, 2, 2, 4);

      Tail1.setRotationPoint(0F, 21F, 5F);

      Tail1.setTextureSize(64, 32);

      Tail1.mirror = true;

      setRotation(Tail1, 0.7853982F, 0F, 0F);

      Tail2 = new ModelRenderer(this, 0, 20);

      Tail2.addBox(-1F, 1.5F, 2.1F, 2, 2, 4);

      Tail2.setRotationPoint(0F, 21F, 5F);

      Tail2.setTextureSize(64, 32);

      Tail2.mirror = true;

      setRotation(Tail2, 1.570796F, 0F, 0F);

      Tail3 = new ModelRenderer(this, 0, 14);

      Tail3.addBox(-1F, 4.8F, 1.9F, 2, 2, 4);

      Tail3.setRotationPoint(0F, 21F, 5F);

      Tail3.setTextureSize(64, 32);

      Tail3.mirror = true;

      setRotation(Tail3, 2.356194F, 0F, 0F);

      Tail4 = new ModelRenderer(this, 0, 8);

      Tail4.addBox(-1F, 7F, -0.6F, 2, 2, 4);

      Tail4.setRotationPoint(0F, 21F, 5F);

      Tail4.setTextureSize(64, 32);

      Tail4.mirror = true;

      setRotation(Tail4, 3.141593F, 0F, 0F);

      sting = new ModelRenderer(this, 0, 5);

      sting.addBox(-0.5F, 6.8F, 3.4F, 1, 1, 2);

      sting.setRotationPoint(0F, 21F, 5F);

      sting.setTextureSize(64, 32);

      sting.mirror = true;

      setRotation(sting, 3.141593F, 0F, 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);

    body.render(f5);

    RightLegA.render(f5);

    RightLegB.render(f5);

    RightLegC.render(f5);

    RightLegD.render(f5);

    LeftLegA.render(f5);

    LeftLegB.render(f5);

    LeftLegC.render(f5);

    LeftLegD.render(f5);

    RightArmA.render(f5);

    RightArmB.render(f5);

    RightArmC.render(f5);

    RightArmD.render(f5);

    LeftArmA.render(f5);

    LeftArmB.render(f5);

    LeftArmC.render(f5);

    LeftArmD.render(f5);

    Tail1.render(f5);

    Tail2.render(f5);

    Tail3.render(f5);

    Tail4.render(f5);

    sting.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);

  }

 

}

 

 

 

MY MODS ARE AWESOME!!!

...and sometimes they won't work :)

Contact me in skype for live chat: Affenkind

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 Terms of Use.