From 581ecd7a41ad0266f5ddb55658bca7e909574f75 Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Sat, 18 Oct 2014 01:21:56 -0400 Subject: [PATCH] Fix fancy labels being flipped on east/west direction; adjust rendering placement --- .../client/renderer/TileEntityDrawersRenderer.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/com/jaquadro/minecraft/storagedrawers/client/renderer/TileEntityDrawersRenderer.java b/src/com/jaquadro/minecraft/storagedrawers/client/renderer/TileEntityDrawersRenderer.java index 6d92a989d..90e6e8626 100644 --- a/src/com/jaquadro/minecraft/storagedrawers/client/renderer/TileEntityDrawersRenderer.java +++ b/src/com/jaquadro/minecraft/storagedrawers/client/renderer/TileEntityDrawersRenderer.java @@ -306,13 +306,17 @@ else if (drawerCount == 3) { mc.gameSettings.fancyGraphics = true; if (StorageDrawers.config.isFancyItemRenderEnabled()) { + float yAdj = 0; + if (drawerCount == 2 || drawerCount == 4) + yAdj = -.5f; + if (blockType) { - GL11.glTranslatef(xc, unit * (yunit + 1.25f), zc); + GL11.glTranslatef(xc, unit * (yunit + 1.75f + yAdj), zc); GL11.glScalef(1, 1, 1); - GL11.glRotatef(getRotationYForSide(side) - 90.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(getRotationYForSide(side) + 90.0F, 0.0F, 1.0F, 0.0F); } else { - GL11.glTranslatef(xc, unit * yunit, zc); - GL11.glScalef(.6f, .6f, .6f); + GL11.glTranslatef(xc, unit * (yunit + 0.75f + yAdj), zc); + GL11.glScalef(.5f, .5f, .5f); GL11.glRotatef(getRotationYForSide(side), 0.0F, 1.0F, 0.0F); } @@ -357,7 +361,7 @@ private void moveRendering (float size, float offsetX, float offsetY, float offs GL11.glScalef(size, size, 1); } - private static final float[] sideRotationY = { 0, 0, 0, 2, 3, 1 }; + private static final float[] sideRotationY = { 0, 0, 0, 2, 1, 3 }; private float getRotationYForSide (ForgeDirection side) { return sideRotationY[side.ordinal()] * 90;