mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-18 02:24:22 +01:00
Fixed crash when rendering skulls in the inventory
This commit is contained in:
parent
fcc682af2b
commit
ad1d9d18ad
1 changed files with 10 additions and 7 deletions
|
@ -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) {
|
protected float handleRotation(float x, float y, float z, @Nullable Direction facing, float rotation) {
|
||||||
|
if (facing == null) {
|
||||||
|
translatef(x + 0.5F, y, z + 0.5F);
|
||||||
|
|
||||||
|
return rotation;
|
||||||
|
}
|
||||||
|
|
||||||
switch (facing) {
|
switch (facing) {
|
||||||
case EAST:
|
|
||||||
default:
|
|
||||||
translatef(x + 0.26F, y + 0.25F, z + 0.5F);
|
|
||||||
return 90;
|
|
||||||
case UP:
|
|
||||||
translatef(x + 0.5F, y, z + 0.5F);
|
|
||||||
break;
|
|
||||||
case NORTH:
|
case NORTH:
|
||||||
translatef(x + 0.5F, y + 0.25F, z + 0.74F);
|
translatef(x + 0.5F, y + 0.25F, z + 0.74F);
|
||||||
break;
|
break;
|
||||||
|
@ -138,6 +137,10 @@ public class PonySkullRenderer extends SkullBlockEntityRenderer implements IRend
|
||||||
case WEST:
|
case WEST:
|
||||||
translatef(x + 0.74F, y + 0.25F, z + 0.5F);
|
translatef(x + 0.74F, y + 0.25F, z + 0.5F);
|
||||||
return 270;
|
return 270;
|
||||||
|
case EAST:
|
||||||
|
default:
|
||||||
|
translatef(x + 0.26F, y + 0.25F, z + 0.5F);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rotation;
|
return rotation;
|
||||||
|
|
Loading…
Reference in a new issue