Coord
Represents a coordinate in the Minecraft world.
This also includes the tilde (~) operator, which represents the current position of caller.
This supports math using the +, -, *, and / operators.
Tilde values don't support multiplication or division.
By default, the toString method will return the coordinate in the format x y z
. With all values rounded to integers (with tildes).
If you want to output floating point values, you can use the Coord.toFloatString method.
Example:
val coord = Coord(1, 2, 3)
val coord2 = Coord(4, 5, 6)
val coord3 = coord + coord2
val coord4 = coord3 - Coord(Tilde(), 5, 6)
val coord4 = coord3 - Coord(Tilde(), 5, Tilde())
Content copied to clipboard