Search in sources :

Example 1 with RenderBiped

use of net.minecraft.client.renderer.entity.RenderBiped in project pnc-repressurized by TeamPneumatic.

the class ClientEventHandler method setRenderHead.

private void setRenderHead(EntityLivingBase entity, boolean setRender) {
    if (entity.getItemStackFromSlot(EntityEquipmentSlot.HEAD).getItem() == Itemss.PNEUMATIC_HELMET && (ConfigHandler.client.useHelmetModel || DateEventHandler.isIronManEvent())) {
        Render renderer = Minecraft.getMinecraft().getRenderManager().getEntityRenderObject(entity);
        if (renderer instanceof RenderBiped) {
            ModelBiped modelBiped = (ModelBiped) ((RenderBiped) renderer).getMainModel();
            modelBiped.bipedHead.showModel = setRender;
        }
    }
}
Also used : ModelBiped(net.minecraft.client.model.ModelBiped) Render(net.minecraft.client.renderer.entity.Render) RenderBiped(net.minecraft.client.renderer.entity.RenderBiped)

Aggregations

ModelBiped (net.minecraft.client.model.ModelBiped)1 Render (net.minecraft.client.renderer.entity.Render)1 RenderBiped (net.minecraft.client.renderer.entity.RenderBiped)1