Fix 1.13 entity direction code, port old schematics

This commit is contained in:
Kenzie Togami
2019-04-16 23:36:03 -07:00
committed by Matthew Miller
parent c325b789b2
commit efc4ebe309
4 changed files with 112 additions and 7 deletions

View File

@ -30,6 +30,44 @@ public final class MCDirections {
}
public static Direction fromHanging(int i) {
switch (i) {
case 0:
return Direction.DOWN;
case 1:
return Direction.UP;
case 2:
return Direction.NORTH;
case 3:
return Direction.SOUTH;
case 4:
return Direction.WEST;
case 5:
return Direction.EAST;
default:
return Direction.DOWN;
}
}
public static int toHanging(Direction direction) {
switch (direction) {
case DOWN:
return 0;
case UP:
return 1;
case NORTH:
return 2;
case SOUTH:
return 3;
case WEST:
return 4;
case EAST:
return 5;
default:
return 0;
}
}
public static Direction fromPre13Hanging(int i) {
switch (i) {
case 0:
return Direction.SOUTH;
@ -44,7 +82,7 @@ public final class MCDirections {
}
}
public static int toHanging(Direction direction) {
public static int toPre13Hanging(Direction direction) {
switch (direction) {
case SOUTH:
return 0;