make standing signs rotatable in normal directions
This commit is contained in:
parent
ba3e80b15c
commit
1b52b26f15
8 changed files with 54 additions and 56 deletions
|
@ -31,7 +31,23 @@ public class SignRenderer extends TileRenderer<TileEntitySign>
|
|||
if (state.getBlock() == Blocks.sign)
|
||||
{
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
|
||||
float f1 = state.getBlock() == Blocks.sign ? (float)(state.getValue(BlockStandingSign.ROTATION) * 360) / 16.0F : 0.0F;
|
||||
int r = state.getBlock() == Blocks.sign ? state.getValue(BlockWallSign.FACING).getIndex() : 0;
|
||||
float f1 = 0.0F;
|
||||
|
||||
if (r == 2)
|
||||
{
|
||||
f1 = 180.0F;
|
||||
}
|
||||
|
||||
if (r == 4)
|
||||
{
|
||||
f1 = 90.0F;
|
||||
}
|
||||
|
||||
if (r == 5)
|
||||
{
|
||||
f1 = -90.0F;
|
||||
}
|
||||
GL11.glRotatef(-f1, 0.0F, 1.0F, 0.0F);
|
||||
this.model.signStick.showModel = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue