use of net.minecraft.client.renderer.entity.RenderPlayer in project PneumaticCraft by MineMaarten.
the class ItemPneumaticArmor method getArmorModel.
/**
* Override this method to have an item handle its own armor rendering.
*
* @param entityLiving The entity wearing the armor
* @param itemStack The itemStack to render the model of
* @param armorSlot 0=head, 1=torso, 2=legs, 3=feet
*
* @return A ModelBiped to render instead of the default
*/
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
if (armorSlot == 0 && (Config.useHelmetModel || DateEventHandler.isIronManEvent())) {
RenderItemPneumaticHelmet.INSTANCE.render(entityLiving);
RenderPlayer render = (RenderPlayer) RenderManager.instance.entityRenderMap.get(EntityPlayer.class);
ModelBiped model = armorSlot == 2 ? render.modelArmor : render.modelArmorChestplate;
model.bipedHead.showModel = false;
return model;
}
return null;
}
Aggregations