Skip to content

Commit

Permalink
Fix fancy labels being flipped on east/west direction; adjust renderi…
Browse files Browse the repository at this point in the history
…ng placement
  • Loading branch information
jaquadro committed Oct 18, 2014
1 parent 47d5f78 commit 581ecd7
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 581ecd7

Please sign in to comment.