/** Drop 0-2 items of this living's type */ @Override protected void dropFewItems(boolean par1, int par2) { float ageMod = TFC_Core.getPercentGrown(this); this.dropItem(Items.feather, (int) (ageMod * this.size_mod * (5 + this.rand.nextInt(10)))); if (isAdult()) { float foodWeight = ageMod * (this.size_mod * 40); // 528 oz (33lbs) is the average yield of lamb after slaughter and // processing TFC_Core.animalDropMeat(this, TFCItems.chickenRaw, foodWeight); this.dropItem(Items.bone, rand.nextInt(2) + 1); } }
@Override public void render( Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) { float percent = TFC_Core.getPercentGrown((IAnimal) entity); float ageScale = 2.0F - percent; float ageHeadScale = (float) Math.pow(1 / ageScale, 0.66); // float offset = 1.4f - percent; this.setRotationAngles(par2, par3, par4, par5, par6, par7, entity); if (entity instanceof IAnimal) { if (((IAnimal) entity).getGender() == GenderEnum.MALE) { if (((IAnimal) entity).isAdult()) { tusk1.isHidden = false; tusk2.isHidden = false; } } GL11.glPushMatrix(); GL11.glTranslatef(0.0F, (0.75f - (0.75f * percent)), 0f); GL11.glScalef(ageHeadScale, ageHeadScale, ageHeadScale); GL11.glTranslatef(0.0F, (ageScale - 1) * -0.125f, 0.1875f - (0.1875f * percent)); head.render(par7); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(0.0F, (0.75f - (0.75f * percent)), 0f); GL11.glScalef(1 / ageScale, 1 / ageScale, 1 / ageScale); body.render(par7); leg1.render(par7); leg2.render(par7); leg3.render(par7); leg4.render(par7); GL11.glPopMatrix(); } }
/** * Actually renders the given argument. This is a synthetic bridge method, always casting down its * argument and then handing it off to a worker function which does the actual work. In all * probabilty, the class Render is generic (Render<T extends Entity) and this method has signature * public void doRender(T entity, double d, double d1, double d2, float f, float f1). But JAD is * pre 1.5 so doesn't do that. */ @Override public void doRender( Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { this.shadowSize = 0.35f + (TFC_Core.getPercentGrown((IAnimal) par1Entity) * 0.35f); super.doRender(par1Entity, par2, par4, par6, par8, par9); }