Fixed the Mana Prism accepting non lens items through automation and crashing the game if any make it in. Closes #1527

This commit is contained in:
Vasco Lavos committed 2015-11-10 23:59:05 +00:00
1 parent 811ed70ef6
commit fd7a2f887d
2 files changed
+25 -7

No files matched your search

@@ -36,12 +36,14 @@ public class RenderTilePrism extends TileEntitySpecialRenderer {
if(stack != null) {
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
ILens lens = (ILens) stack.getItem();
GL11.glPushMatrix();
GL11.glRotatef(90F, 1F, 0F, 0F);
GL11.glTranslatef(0F, 0F, pos);
RenderLens.render(stack, lens.getLensColor(stack));
GL11.glPopMatrix();
if(stack.getItem() instanceof ILens) {
ILens lens = (ILens) stack.getItem();
GL11.glPushMatrix();
GL11.glRotatef(90F, 1F, 0F, 0F);
GL11.glTranslatef(0F, 0F, pos);
RenderLens.render(stack, lens.getLensColor(stack));
GL11.glPopMatrix();
}
}
GL11.glPopMatrix();
}