Search in sources :

Example 1 with LayerBloodElytra

use of WayofTime.bloodmagic.client.render.LayerBloodElytra in project BloodMagic by WayofTime.

the class ClientProxy method addElytraLayer.

private void addElytraLayer() {
    RenderManager renderManager = Minecraft.getMinecraft().getRenderManager();
    try {
        Map<String, RenderPlayer> skinMap = ObfuscationReflectionHelper.getPrivateValue(RenderManager.class, renderManager, "skinMap", "field_178636_l");
        skinMap.get("default").addLayer(new LayerBloodElytra(skinMap.get("default")));
        skinMap.get("slim").addLayer(new LayerBloodElytra(skinMap.get("slim")));
        BMLog.DEBUG.info("Elytra layer added");
    } catch (Exception e) {
        BMLog.DEBUG.error("Failed to set custom Elytra Layer for Elytra Living Armour Upgrade: {}", e.getMessage());
    }
}
Also used : LayerBloodElytra(WayofTime.bloodmagic.client.render.LayerBloodElytra) RenderPlayer(net.minecraft.client.renderer.entity.RenderPlayer) RenderManager(net.minecraft.client.renderer.entity.RenderManager)

Aggregations

LayerBloodElytra (WayofTime.bloodmagic.client.render.LayerBloodElytra)1 RenderManager (net.minecraft.client.renderer.entity.RenderManager)1 RenderPlayer (net.minecraft.client.renderer.entity.RenderPlayer)1