diff --git a/src/main/java/com/minelittlepony/render/LevitatingItemRenderer.java b/src/main/java/com/minelittlepony/render/LevitatingItemRenderer.java index 646d3cf6..05892f23 100644 --- a/src/main/java/com/minelittlepony/render/LevitatingItemRenderer.java +++ b/src/main/java/com/minelittlepony/render/LevitatingItemRenderer.java @@ -82,7 +82,7 @@ public class LevitatingItemRenderer { IRenderItem renderItem = (IRenderItem)Minecraft.getMinecraft().getRenderItem(); renderItem.useTransparency(true); - ((IRenderItem)PonySkullRenderer.instance).useTransparency(true); + PonySkullRenderer.ponyInstance.useTransparency(true); setColor(pony.getMetadata().getGlowColor()); @@ -94,7 +94,8 @@ public class LevitatingItemRenderer { renderer.renderItemSide(entity, stack, transform, left); renderItem.useTransparency(false); - ((IRenderItem)PonySkullRenderer.instance).useTransparency(false); + PonySkullRenderer.ponyInstance.useTransparency(false); + unsetColor(); enableLighting(); } diff --git a/src/main/java/com/minelittlepony/render/PonySkullRenderer.java b/src/main/java/com/minelittlepony/render/PonySkullRenderer.java index 0eb26786..e558abcc 100644 --- a/src/main/java/com/minelittlepony/render/PonySkullRenderer.java +++ b/src/main/java/com/minelittlepony/render/PonySkullRenderer.java @@ -24,7 +24,7 @@ import net.minecraft.util.ResourceLocation; */ public class PonySkullRenderer extends TileEntitySkullRenderer implements IRenderItem { - private static PonySkullRenderer ponyInstance = new PonySkullRenderer(); + public static PonySkullRenderer ponyInstance = new PonySkullRenderer(); private static TileEntitySkullRenderer backup = null; private static final Map skullMap = new HashMap(); @@ -43,8 +43,11 @@ public class PonySkullRenderer extends TileEntitySkullRenderer implements IRende instance = ponyInstance; } } else { - if ((instance instanceof PonySkullRenderer) && backup != null) { + if ((instance instanceof PonySkullRenderer)) { ponyInstance = (PonySkullRenderer)instance; + if (backup == null) { + backup = new TileEntitySkullRenderer(); + } ModUtilities.addRenderer(TileEntitySkull.class, backup); instance = backup; }