Interface Coordinates
- All Known Subinterfaces:
Coordinates.BlockCoordinates, Coordinates.ColumnCoordinates, Coordinates.CoordinatesXZ
public interface Coordinates
A
Coordinates wrapper for easier use with cloud commands.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA specialized version ofCoordinatesfor representing the result of the vanillaBlockPosArgument.static interfaceA specialized version ofCoordinatesfor representing the result of the vanillaColumnPosArgument.static interfaceA specialized version ofCoordinatesfor representing the result of the vanillaVec2Argument, which accepts two doubles for the x and z coordinate, always defaulting to 0 for the y coordinate. -
Method Summary
Modifier and TypeMethodDescription@NonNull net.minecraft.core.BlockPosblockPos()Resolve a block position from the parsed coordinates.booleanGet whether the x coordinate is relative.booleanGet whether the y coordinate is relative.booleanGet whether the z coordinate is relative.@NonNull net.minecraft.world.phys.Vec3position()Resolve a position from the parsed coordinates.@NonNull net.minecraft.commands.arguments.coordinates.CoordinatesGet the coordinates wrapped by thisCoordinates.
-
Method Details
-
position
@NonNull net.minecraft.world.phys.Vec3 position()Resolve a position from the parsed coordinates.- Returns:
- position
-
blockPos
@NonNull net.minecraft.core.BlockPos blockPos()Resolve a block position from the parsed coordinates.- Returns:
- block position
-
isXRelative
boolean isXRelative()Get whether the x coordinate is relative.- Returns:
- whether the x coordinate is relative
-
isYRelative
boolean isYRelative()Get whether the y coordinate is relative.- Returns:
- whether the y coordinate is relative
-
isZRelative
boolean isZRelative()Get whether the z coordinate is relative.- Returns:
- whether the z coordinate is relative
-
wrappedCoordinates
@NonNull net.minecraft.commands.arguments.coordinates.Coordinates wrappedCoordinates()Get the coordinates wrapped by thisCoordinates.- Returns:
- the base coordinates
-