use of net.minecraft.client.renderer.entity.RenderLiving in project Wizardry by TeamWizardry.
the class ClientProxy method init.
@Override
public void init(FMLInitializationEvent event) {
super.init(event);
MinecraftForge.EVENT_BUS.register(CapeHandler.instance());
Map<String, RenderPlayer> skinMap = Minecraft.getMinecraft().getRenderManager().getSkinMap();
for (RenderPlayer render : skinMap.values()) {
// render.addLayer(new BloodRenderLayer(render));
render.addLayer(new RenderHaloEntity(render.getMainModel().bipedHead));
}
Map<Class<? extends Entity>, Render<? extends Entity>> map = Minecraft.getMinecraft().getRenderManager().entityRenderMap;
for (ResourceLocation entity : EntityList.getEntityNameList()) {
Class<? extends Entity> clazz = EntityList.getClass(entity);
Render<? extends Entity> entityRenderer = map.get(clazz);
if (entityRenderer instanceof RenderLiving<?>) {
ModelBase main = ((RenderLiving<?>) entityRenderer).getMainModel();
ModelRenderer renderer = null;
if (main instanceof ModelBiped)
renderer = ((ModelBiped) main).bipedHead;
((RenderLiving<?>) entityRenderer).addLayer(new RenderHaloEntity(renderer));
}
}
}
Aggregations