diff options
author | md_5 <git@md-5.net> | 2016-06-25 21:21:36 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-06-25 21:21:36 +1000 |
commit | ee5ffeef052667ce63800a8f0a6e3e480b22fb62 (patch) | |
tree | c0e600679c743d63fa976cb0d4bdb7d2173607ff /src/main | |
parent | 0631f168ea99e6f32a1c79fae9abf3341ab98c3b (diff) | |
download | bukkit-ee5ffeef052667ce63800a8f0a6e3e480b22fb62.tar bukkit-ee5ffeef052667ce63800a8f0a6e3e480b22fb62.tar.gz bukkit-ee5ffeef052667ce63800a8f0a6e3e480b22fb62.tar.lz bukkit-ee5ffeef052667ce63800a8f0a6e3e480b22fb62.tar.xz bukkit-ee5ffeef052667ce63800a8f0a6e3e480b22fb62.zip |
SPIGOT-1039: Improve DoubleChest semantics
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/block/DoubleChest.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/bukkit/block/DoubleChest.java b/src/main/java/org/bukkit/block/DoubleChest.java index 148099c5..663fcbbd 100644 --- a/src/main/java/org/bukkit/block/DoubleChest.java +++ b/src/main/java/org/bukkit/block/DoubleChest.java @@ -29,22 +29,22 @@ public class DoubleChest implements InventoryHolder { } public Location getLocation() { - return new Location(getWorld(), getX(), getY(), getZ()); + return getInventory().getLocation(); } public World getWorld() { - return ((Chest)getLeftSide()).getWorld(); + return getLocation().getWorld(); } public double getX() { - return 0.5 * (((Chest)getLeftSide()).getX() + ((Chest)getRightSide()).getX()); + return getLocation().getX(); } public double getY() { - return 0.5 * (((Chest)getLeftSide()).getY() + ((Chest)getRightSide()).getY()); + return getLocation().getY(); } public double getZ() { - return 0.5 * (((Chest)getLeftSide()).getZ() + ((Chest)getRightSide()).getZ()); + return getLocation().getZ(); } } |