MCPcopy Index your code
hub / github.com/PaperMC/Paper / toCenterLocation

Method toCenterLocation

paper-api/src/main/java/org/bukkit/Location.java:734–741  ·  view source on GitHub ↗

@return A new location where X/Y/Z are the center of the block

()

Source from the content-addressed store, hash-verified

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())

Callers

nothing calls this directly

Calls 7

cloneMethod · 0.95
setXMethod · 0.95
getBlockXMethod · 0.95
setYMethod · 0.95
getBlockYMethod · 0.95
setZMethod · 0.95
getBlockZMethod · 0.95

Tested by

no test coverage detected