Fixed crash when rendering skulls in the inventory

This commit is contained in:
Sollace 2019-06-02 16:01:24 +02:00
parent fcc682af2b
commit ad1d9d18ad

View file

@ -121,14 +121,13 @@ public class PonySkullRenderer extends SkullBlockEntityRenderer implements IRend
}
protected float handleRotation(float x, float y, float z, @Nullable Direction facing, float rotation) {
switch (facing) {
case EAST:
default:
translatef(x + 0.26F, y + 0.25F, z + 0.5F);
return 90;
case UP:
if (facing == null) {
translatef(x + 0.5F, y, z + 0.5F);
break;
return rotation;
}
switch (facing) {
case NORTH:
translatef(x + 0.5F, y + 0.25F, z + 0.74F);
break;
@ -138,6 +137,10 @@ public class PonySkullRenderer extends SkullBlockEntityRenderer implements IRend
case WEST:
translatef(x + 0.74F, y + 0.25F, z + 0.5F);
return 270;
case EAST:
default:
translatef(x + 0.26F, y + 0.25F, z + 0.5F);
break;
}
return rotation;