13
0
geforkt von Mirrors/Paper

Implementation for the new rotation values. Fixes SPIGOT-93

Dieser Commit ist enthalten in:
Fabian Faßbender 2014-12-02 00:13:25 +01:00
Ursprung d2c2630307
Commit 0d5693dec5

Datei anzeigen

@ -52,11 +52,19 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
case 0: case 0:
return Rotation.NONE; return Rotation.NONE;
case 1: case 1:
return Rotation.CLOCKWISE; return Rotation.CLOCKWISE_45;
case 2: case 2:
return Rotation.FLIPPED; return Rotation.CLOCKWISE;
case 3: case 3:
return Rotation.CLOCKWISE_135;
case 4:
return Rotation.FLIPPED;
case 5:
return Rotation.FLIPPED_45;
case 6:
return Rotation.COUNTER_CLOCKWISE; return Rotation.COUNTER_CLOCKWISE;
case 7:
return Rotation.COUNTER_CLOCKWISE_45;
default: default:
throw new AssertionError("Unknown rotation " + value + " for " + getHandle()); throw new AssertionError("Unknown rotation " + value + " for " + getHandle());
} }
@ -72,12 +80,20 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
switch (rotation) { switch (rotation) {
case NONE: case NONE:
return 0; return 0;
case CLOCKWISE: case CLOCKWISE_45:
return 1; return 1;
case FLIPPED: case CLOCKWISE:
return 2; return 2;
case COUNTER_CLOCKWISE: case CLOCKWISE_135:
return 3; return 3;
case FLIPPED:
return 4;
case FLIPPED_45:
return 5;
case COUNTER_CLOCKWISE:
return 6;
case COUNTER_CLOCKWISE_45:
return 7;
default: default:
throw new IllegalArgumentException(rotation + " is not applicable to an ItemFrame"); throw new IllegalArgumentException(rotation + " is not applicable to an ItemFrame");
} }