Jump to content

[1.7.10 UNLSOLVED] Biped Mob addRandomArmor() doesn't seem to work


Hextor

Recommended Posts

I have a mob,that renders as a bided,his model extends the biped class and still somehow doesn't holds the item i tell him to do.

Here are my classes:

 

public class ModelDefaultOrcGuard extends ModelBiped

{

  //fields

public ModelRenderer bipedHead;

    public ModelRenderer bipedHeadwear;

    public ModelRenderer bipedBody;

    public ModelRenderer bipedRightArm;

    public ModelRenderer bipedLeftArm;

    public ModelRenderer bipedRightLeg;

    public ModelRenderer bipedLeftLeg;

   

  public ModelDefaultOrcGuard()

  {

    textureWidth = 64;

    textureHeight = 32;

   

      bipedHead = new ModelRenderer(this, 0, 0);

      bipedHead.addBox(-4F, -8F, -4F, 8, 8, 8);

      bipedHead.setRotationPoint(0F, 0F, 0F);

      bipedHead.setTextureSize(64, 32);

      bipedHead.mirror = true;

      setRotation(bipedHead, 0F, 0F, 0F);

      bipedBody = new ModelRenderer(this, 16, 16);

      bipedBody.addBox(-4F, 0F, -2F, 8, 12, 4);

      bipedBody.setRotationPoint(0F, 0F, 0F);

      bipedBody.setTextureSize(64, 32);

      bipedBody.mirror = true;

      setRotation(bipedBody, 0F, 0F, 0F);

      bipedRightArm = new ModelRenderer(this, 40, 16);

      bipedRightArm.addBox(-3F, -2F, -2F, 4, 12, 4);

      bipedRightArm.setRotationPoint(-5F, 2F, 0F);

      bipedRightArm.setTextureSize(64, 32);

      bipedRightArm.mirror = true;

      setRotation(bipedRightArm, 0F, 0F, 0F);

      bipedLeftArm = new ModelRenderer(this, 40, 16);

      bipedLeftArm.addBox(-1F, -2F, -2F, 4, 12, 4);

      bipedLeftArm.setRotationPoint(5F, 2F, 0F);

      bipedLeftArm.setTextureSize(64, 32);

      bipedLeftArm.mirror = true;

      setRotation(bipedLeftArm, 0F, 0F, 0F);

      bipedRightLeg = new ModelRenderer(this, 0, 16);

      bipedRightLeg.addBox(-2F, 0F, -2F, 4, 12, 4);

      bipedRightLeg.setRotationPoint(-2F, 12F, 0F);

      bipedRightLeg.setTextureSize(64, 32);

      bipedRightLeg.mirror = true;

      setRotation(bipedRightLeg, 0F, 0F, 0F);

      bipedLeftLeg = new ModelRenderer(this, 0, 16);

      bipedLeftLeg.addBox(-2F, 0F, -2F, 4, 12, 4);

      bipedLeftLeg.setRotationPoint(2F, 12F, 0F);

      bipedLeftLeg.setTextureSize(64, 32);

      bipedLeftLeg.mirror = true;

      setRotation(bipedLeftLeg, 0F, 0F, 0F);

  }

 

  public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)

  {

 

    setRotationAngles(entity,f, f1, f2, f3, f4, f5);

    bipedHead.render(f5);

    bipedBody.render(f5);

    bipedRightArm.render(f5);

    bipedLeftArm.render(f5);

    bipedRightLeg.render(f5);

    bipedLeftLeg.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(Entity entity,float f, float f1, float f2, float f3, float f4, float f5)

  {

    super.setRotationAngles(f, f1, f2, f3, f4, f5,entity);

 

    this.bipedHead.rotateAngleY = f3 / (180F / (float)Math.PI);

    this.bipedHead.rotateAngleX = f4 / (180F / (float)Math.PI);

    this.bipedRightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1 * 0.5F;

    this.bipedLeftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F;

    this.bipedRightArm.rotateAngleZ = 0.0F;

    this.bipedLeftArm.rotateAngleZ = 0.0F;

    this.bipedRightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;

    this.bipedLeftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1;

    this.bipedRightLeg.rotateAngleY = 0.0F;

    this.bipedLeftLeg.rotateAngleY = 0.0F;

  }

 

}

 

public class RenderDefaultOrcGuard extends RenderBiped{

 

private static final ResourceLocation DOGTextures = new ResourceLocation(Aethoscraft.modid + ":" + "textures/model/DefOrcGuard.png");

 

protected ModelDefaultOrcGuard modelEntity;

 

public RenderDefaultOrcGuard(ModelBiped model, float f) {

super(model, f);

 

modelEntity = ((ModelDefaultOrcGuard)mainModel);

}

 

protected void renderEquippedItems(EntityDefaultOrcGuard entity, float par2)

    {

        super.renderEquippedItems((EntityLiving)entity, par2);

    }

   

    protected void renderEquippedItems(EntityLivingBase entityLivingBase, float par2)

    {

        this.renderEquippedItems((EntityDefaultOrcGuard)entityLivingBase, par2);

    }

   

@Override

protected ResourceLocation getEntityTexture(Entity p_110775_1_) {

 

return this.DOGTextures;

}

 

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Add the crash-report or latest.log (logs-folder) with sites like https://mclo.gs/ and paste the link to it here  
    • Add the ful lcrash-report or latest.log (logs-folder) with sites like https://mclo.gs/ and paste the link to it here
    • I cant craft any of the epic fight mod weapons. I try using the recipes in the crafting table but nothing is working. and when i click on the epic fight weapon in jei there is no recipe at all.
    • Oklahoma Nation Cowboys at Youngstown Country PenguinsYoungstown, Ohio; Wednesday, 7 p.m. EDTBOTTOM LINE: The Youngstown Region Penguins facial area the Oklahoma Country Cowboys within the Countrywide Invitation Penguins include absent 15-5 versus Horizon League rivals, with a 9-4 history within non-meeting participate in. Youngstown Region is 1-2 inside online games resolved as a result of considerably less than 4 facts. The Cowboys are 8-10 in just Massive 12 engage in. Oklahoma Region ranks 9th within just the Large 12 taking pictures 31.1% towards 3-stage wide PERFORMERS: Dwayne Cohill is averaging 17.8 details and 4.8 helps for the Penguins. Adrian Nelson is averaging 17.1 info higher than the remaining 10 game titles for Youngstown Thompson is averaging 11.7 details for the Cowboys. Caleb Asberry is averaging 13.1 facts about the very last 10 video games for Oklahoma last 10 Video games: Penguins: 7-3 Zeke Zaragoza Jersey, averaging 79.7 info, 33.4 rebounds, 14.8 helps, 5.3 steals and 2.7 blocks for each video game despite the fact that capturing 48.1% versus the marketplace. Their rivals incorporate averaged 72.4 details for every : 4-6, averaging 66.4 specifics, 33.1 rebounds, 11.1 helps Jake Henry Jersey, 4.9 steals and 3.6 blocks for each sport even though taking pictures 41.3% towards the sector. Their rivals consist of averaged 72.0 info. The made this tale making use of technological innovation delivered by means of Information and facts Skrive and info against Sportradar. Cowboys Shop
    • Oklahoma Nation Cowboys at Youngstown Country PenguinsYoungstown, Ohio; Wednesday, 7 p.m. EDTBOTTOM LINE: The Youngstown Region Penguins facial area the Oklahoma Country Cowboys within the Countrywide Invitation Penguins include absent 15-5 versus Horizon League rivals, with a 9-4 history within non-meeting participate in. Youngstown Region is 1-2 inside online games resolved as a result of considerably less than 4 facts. The Cowboys are 8-10 in just Massive 12 engage in. Oklahoma Region ranks 9th within just the Large 12 taking pictures 31.1% towards 3-stage wide PERFORMERS: Dwayne Cohill is averaging 17.8 details and 4.8 helps for the Penguins. Adrian Nelson is averaging 17.1 info higher than the remaining 10 game titles for Youngstown Thompson is averaging 11.7 details for the Cowboys. Caleb Asberry is averaging 13.1 facts about the very last 10 video games for Oklahoma last 10 Video games: Penguins: 7-3 Zeke Zaragoza Jersey, averaging 79.7 info, 33.4 rebounds, 14.8 helps, 5.3 steals and 2.7 blocks for each video game despite the fact that capturing 48.1% versus the marketplace. Their rivals incorporate averaged 72.4 details for every : 4-6, averaging 66.4 specifics, 33.1 rebounds, 11.1 helps Jake Henry Jersey, 4.9 steals and 3.6 blocks for each sport even though taking pictures 41.3% towards the sector. Their rivals consist of averaged 72.0 info. The made this tale making use of technological innovation delivered by means of Information and facts Skrive and info against Sportradar. Cowboys Shop
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.