mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 09:17:36 +01:00
SPIGOT-1039: Improve DoubleChest semantics
By: md_5 <git@md-5.net>
This commit is contained in:
parent
00f0acbeeb
commit
880ba74a11
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user