Record Class MazeLocation
java.lang.Object
java.lang.Record
dev.despical.mazeengine.api.model.MazeLocation
- Record Components:
worldId- the persistent world UUIDx- the world block X coordinatey- the world block Y coordinatez- the world block Z coordinate
Stores a world block position without retaining a live Bukkit world.
The UUID identifies the world persistently, even while it is unloaded. X, Y, and Z are integer block coordinates and may be negative. This value does not check build height, world borders, or whether the world currently exists.
Creation requests interpret this position as the maze's minimum block corner
and floor layer. Route endpoints instead use CellPosition indices.
-
Constructor Summary
ConstructorsConstructorDescriptionMazeLocation(UUID worldId, int x, int y, int z) Constructs a block position with a required world identity. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.worldId()Returns the value of theworldIdrecord component.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.intz()Returns the value of thezrecord component.
-
Constructor Details
-
MazeLocation
Constructs a block position with a required world identity.No Bukkit world lookup occurs here. APIs that resolve a live destination or submit world work check world availability separately.
- Parameters:
worldId- the world UUIDx- the world block X coordinatey- the world block Y coordinatez- the world block Z coordinate- Throws:
NullPointerException- ifworldIdis null
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
worldId
-
x
-
y
-
z
-