@return A new location where X/Y/Z are the center of the block
()
| 732 | * @return A new location where X/Y/Z are the center of the block |
| 733 | */ |
| 734 | @NotNull |
| 735 | public Location toCenterLocation() { |
| 736 | Location centerLoc = clone(); |
| 737 | centerLoc.setX(getBlockX() + 0.5); |
| 738 | centerLoc.setY(getBlockY() + 0.5); |
| 739 | centerLoc.setZ(getBlockZ() + 0.5); |
| 740 | return centerLoc; |
| 741 | } |
| 742 | |
| 743 | /** |
| 744 | * Returns a copy of this location except with y = getWorld().getHighestBlockYAt(this.getBlockX(), this.getBlockZ()) |