Fixed the Mana Pump's render crashing the game if it's placed with an invalid metadata somehow.

This commit is contained in:
Vasco Lavos committed 2015-10-24 01:10:55 +01:00
1 parent 527cb2be95
commit 69ed66aca0
1 file changed
+1 -1
@@ -45,7 +45,7 @@ public class RenderTilePump extends TileEntitySpecialRenderer {
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
GL11.glScalef(1F, -1F, -1F);
GL11.glRotatef(ROTATIONS[Math.max(Math.min(ROTATIONS.length, meta - 2), 0)], 0F, 1F, 0F);
GL11.glRotatef(ROTATIONS[Math.max(Math.min(ROTATIONS.length - 1, meta - 2), 0)], 0F, 1F, 0F);
model.render(Math.max(0F, Math.min(8F, pump.innerRingPos + pump.moving * f)));
GL11.glColor3f(1F, 1F, 1F);
GL11.glScalef(1F, -1F, -1F);