Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Forgot that i work in Bukkit... Screw sun conventions
Dieser Commit ist enthalten in:
Ursprung
0d5693dec5
Commit
7371301edb
@ -49,24 +49,24 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
|
|||||||
Rotation toBukkitRotation(int value) {
|
Rotation toBukkitRotation(int value) {
|
||||||
// Translate NMS rotation integer to Bukkit API
|
// Translate NMS rotation integer to Bukkit API
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 0:
|
case 0:
|
||||||
return Rotation.NONE;
|
return Rotation.NONE;
|
||||||
case 1:
|
case 1:
|
||||||
return Rotation.CLOCKWISE_45;
|
return Rotation.CLOCKWISE_45;
|
||||||
case 2:
|
case 2:
|
||||||
return Rotation.CLOCKWISE;
|
return Rotation.CLOCKWISE;
|
||||||
case 3:
|
case 3:
|
||||||
return Rotation.CLOCKWISE_135;
|
return Rotation.CLOCKWISE_135;
|
||||||
case 4:
|
case 4:
|
||||||
return Rotation.FLIPPED;
|
return Rotation.FLIPPED;
|
||||||
case 5:
|
case 5:
|
||||||
return Rotation.FLIPPED_45;
|
return Rotation.FLIPPED_45;
|
||||||
case 6:
|
case 6:
|
||||||
return Rotation.COUNTER_CLOCKWISE;
|
return Rotation.COUNTER_CLOCKWISE;
|
||||||
case 7:
|
case 7:
|
||||||
return Rotation.COUNTER_CLOCKWISE_45;
|
return Rotation.COUNTER_CLOCKWISE_45;
|
||||||
default:
|
default:
|
||||||
throw new AssertionError("Unknown rotation " + value + " for " + getHandle());
|
throw new AssertionError("Unknown rotation " + value + " for " + getHandle());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,24 +78,24 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
|
|||||||
static int toInteger(Rotation rotation) {
|
static int toInteger(Rotation rotation) {
|
||||||
// Translate Bukkit API rotation to NMS integer
|
// Translate Bukkit API rotation to NMS integer
|
||||||
switch (rotation) {
|
switch (rotation) {
|
||||||
case NONE:
|
case NONE:
|
||||||
return 0;
|
return 0;
|
||||||
case CLOCKWISE_45:
|
case CLOCKWISE_45:
|
||||||
return 1;
|
return 1;
|
||||||
case CLOCKWISE:
|
case CLOCKWISE:
|
||||||
return 2;
|
return 2;
|
||||||
case CLOCKWISE_135:
|
case CLOCKWISE_135:
|
||||||
return 3;
|
return 3;
|
||||||
case FLIPPED:
|
case FLIPPED:
|
||||||
return 4;
|
return 4;
|
||||||
case FLIPPED_45:
|
case FLIPPED_45:
|
||||||
return 5;
|
return 5;
|
||||||
case COUNTER_CLOCKWISE:
|
case COUNTER_CLOCKWISE:
|
||||||
return 6;
|
return 6;
|
||||||
case COUNTER_CLOCKWISE_45:
|
case COUNTER_CLOCKWISE_45:
|
||||||
return 7;
|
return 7;
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException(rotation + " is not applicable to an ItemFrame");
|
throw new IllegalArgumentException(rotation + " is not applicable to an ItemFrame");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren