mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 04:26:42 +00:00
Merge master again
This commit is contained in:
@ -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,21 +82,6 @@ public final class MCDirections {
|
||||
}
|
||||
}
|
||||
|
||||
public static int toHanging(Direction direction) {
|
||||
switch (direction) {
|
||||
case SOUTH:
|
||||
return 0;
|
||||
case WEST:
|
||||
return 1;
|
||||
case NORTH:
|
||||
return 2;
|
||||
case EAST:
|
||||
return 3;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static int fromLegacyHanging(byte i) {
|
||||
switch (i) {
|
||||
case 0: return 2;
|
||||
@ -68,15 +91,6 @@ public final class MCDirections {
|
||||
}
|
||||
}
|
||||
|
||||
public static byte toLegacyHanging(int i) {
|
||||
switch (i) {
|
||||
case 0: return (byte) 2;
|
||||
case 1: return (byte) 1;
|
||||
case 2: return (byte) 0;
|
||||
default: return (byte) 3;
|
||||
}
|
||||
}
|
||||
|
||||
public static Direction fromRotation(int i) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
|
Reference in New Issue
Block a user