use of com.teamwizardry.wizardry.client.render.item.RenderHaloPlayer 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());
Minecraft.getMinecraft().getRenderManager().getSkinMap().values().forEach(render -> render.addLayer(new BloodRenderLayer(render)));
Map<String, RenderPlayer> skinMap = Minecraft.getMinecraft().getRenderManager().getSkinMap();
RenderPlayer render = skinMap.get("default");
render.addLayer(new RenderHaloPlayer(render.getMainModel().bipedHead));
render = skinMap.get("slim");
render.addLayer(new RenderHaloPlayer(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