addOffset
Creates a new Location with the specified offsets added to this Location's coordinates.
This function clones the current Location and adds the specified x, y, and z offsets. All parameters are optional and default to 0.0.
Example:
val original = Location(world, 10.0, 64.0, -20.0)
val offset = original.addOffset(x = 5.0, y = 10.0) // (15.0, 74.0, -20.0)Content copied to clipboard
Return
A new Location with the offsets applied
Parameters
x
The x-coordinate offset to add (default: 0.0)
y
The y-coordinate offset to add (default: 0.0)
z
The z-coordinate offset to add (default: 0.0)