diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-02 13:23:46 +0100 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-02 13:23:46 +0100 |
commit | 275603d37acd74bbb6087d657a68b67aa2323c8a (patch) | |
tree | 16c8105a97f4d661ca3c793c73f470338ebb27a9 /src/main | |
parent | 733e4290d84bc18b43b5311e1b12a6f7df65450d (diff) | |
parent | 7371301edb1c44ab9153e1fba3722ba2f4e3c411 (diff) | |
download | craftbukkit-275603d37acd74bbb6087d657a68b67aa2323c8a.tar craftbukkit-275603d37acd74bbb6087d657a68b67aa2323c8a.tar.gz craftbukkit-275603d37acd74bbb6087d657a68b67aa2323c8a.tar.lz craftbukkit-275603d37acd74bbb6087d657a68b67aa2323c8a.tar.xz craftbukkit-275603d37acd74bbb6087d657a68b67aa2323c8a.zip |
Merge pull request #21 in SPIGOT/craftbukkit from ~GENAZT/craftbukkit:bugfix/SPIGOT-93 to master
* commit '7371301edb1c44ab9153e1fba3722ba2f4e3c411':
Forgot that i work in Bukkit... Screw sun conventions
Implementation for the new rotation values. Fixes SPIGOT-93
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java index 3f4e1ae6..82370939 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java @@ -52,11 +52,19 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame { case 0: return Rotation.NONE; case 1: - return Rotation.CLOCKWISE; + return Rotation.CLOCKWISE_45; case 2: - return Rotation.FLIPPED; + return Rotation.CLOCKWISE; case 3: + return Rotation.CLOCKWISE_135; + case 4: + return Rotation.FLIPPED; + case 5: + return Rotation.FLIPPED_45; + case 6: return Rotation.COUNTER_CLOCKWISE; + case 7: + return Rotation.COUNTER_CLOCKWISE_45; default: throw new AssertionError("Unknown rotation " + value + " for " + getHandle()); } @@ -72,12 +80,20 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame { switch (rotation) { case NONE: return 0; - case CLOCKWISE: + case CLOCKWISE_45: return 1; - case FLIPPED: + case CLOCKWISE: return 2; - case COUNTER_CLOCKWISE: + case CLOCKWISE_135: return 3; + case FLIPPED: + return 4; + case FLIPPED_45: + return 5; + case COUNTER_CLOCKWISE: + return 6; + case COUNTER_CLOCKWISE_45: + return 7; default: throw new IllegalArgumentException(rotation + " is not applicable to an ItemFrame"); } |