Interface Coordinates
- All Known Subinterfaces:
Coordinates.BlockCoordinates
,Coordinates.ColumnCoordinates
,Coordinates.CoordinatesXZ
public interface Coordinates
A
Coordinates
wrapper for easier use with cloud commands.- Since:
- 1.5.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A specialized version ofCoordinates
for representing the result of the vanillaBlockPosArgument
.static interface
A specialized version ofCoordinates
for representing the result of the vanillaColumnPosArgument
.static interface
A specialized version ofCoordinates
for 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.BlockPos
blockPos()
Resolve a block position from the parsed coordinates.boolean
Get whether the x coordinate is relative.boolean
Get whether the y coordinate is relative.boolean
Get whether the z coordinate is relative.@NonNull net.minecraft.world.phys.Vec3
position()
Resolve a position from the parsed coordinates.@NonNull net.minecraft.commands.arguments.coordinates.Coordinates
Get the coordinates wrapped by thisCoordinates
.
-
Method Details
-
position
@NonNull net.minecraft.world.phys.Vec3 position()Resolve a position from the parsed coordinates.- Returns:
- position
- Since:
- 1.5.0
-
blockPos
@NonNull net.minecraft.core.BlockPos blockPos()Resolve a block position from the parsed coordinates.- Returns:
- block position
- Since:
- 1.5.0
-
isXRelative
boolean isXRelative()Get whether the x coordinate is relative.- Returns:
- whether the x coordinate is relative
- Since:
- 1.5.0
-
isYRelative
boolean isYRelative()Get whether the y coordinate is relative.- Returns:
- whether the y coordinate is relative
- Since:
- 1.5.0
-
isZRelative
boolean isZRelative()Get whether the z coordinate is relative.- Returns:
- whether the z coordinate is relative
- Since:
- 1.5.0
-
wrappedCoordinates
@NonNull net.minecraft.commands.arguments.coordinates.Coordinates wrappedCoordinates()Get the coordinates wrapped by thisCoordinates
.- Returns:
- the base coordinates
- Since:
- 1.5.0
-