Package xyz.calcugames.levelz
Class LevelObject
java.lang.Object
xyz.calcugames.levelz.LevelObject
- All Implemented Interfaces:
Comparable<LevelObject>
Utility Object for representing a Level Block and its Coordinate.
-
Constructor Summary
ConstructorsConstructorDescriptionLevelObject(@NotNull String name, int x, int y) Creates a new LevelObject with the given block and coordinate.LevelObject(@NotNull String name, int x, int y, int z) Creates a new LevelObject with the given block and coordinate.LevelObject(@NotNull String name, Map<String, Object> properties, int x, int y) Creates a new LevelObject with the given block and coordinate.LevelObject(@NotNull String name, Map<String, Object> properties, int x, int y, int z) Creates a new LevelObject with the given block and coordinate.LevelObject(@NotNull Block block, int x, int y) Creates a new LevelObject with the given block and coordinate.LevelObject(@NotNull Block block, int x, int y, int z) Creates a new LevelObject with the given block and coordinate.LevelObject(@NotNull Block block, @NotNull Coordinate coordinate) Creates a new LevelObject with the given block and coordinate. -
Method Summary
Modifier and TypeMethodDescriptionintboolean@NotNull BlockgetBlock()Gets the block of this LevelObject.@NotNull CoordinateGets the coordinate of this LevelObject.inthashCode()toString()
-
Constructor Details
-
LevelObject
Creates a new LevelObject with the given block and coordinate.- Parameters:
block- Blockcoordinate- Coordinate
-
LevelObject
Creates a new LevelObject with the given block and coordinate.- Parameters:
block- Blockx- X Coordinatey- Y Coordinate
-
LevelObject
Creates a new LevelObject with the given block and coordinate.- Parameters:
name- Block Namex- X Coordinatey- Y Coordinate
-
LevelObject
Creates a new LevelObject with the given block and coordinate.- Parameters:
name- Block Nameproperties- Block Propertiesx- X Coordinatey- Y Coordinate
-
LevelObject
Creates a new LevelObject with the given block and coordinate.- Parameters:
block- Blockx- X Coordinatey- Y Coordinatez- Z Coordinate
-
LevelObject
Creates a new LevelObject with the given block and coordinate.- Parameters:
name- Block Namex- X Coordinatey- Y Coordinatez- Z Coordinate
-
LevelObject
public LevelObject(@NotNull @NotNull String name, Map<String, Object> properties, int x, int y, int z) Creates a new LevelObject with the given block and coordinate.- Parameters:
name- Block Nameproperties- Block Propertiesx- X Coordinatey- Y Coordinatez- Z Coordinate
-
-
Method Details
-
getBlock
Gets the block of this LevelObject.- Returns:
- LevelObject Block
-
getCoordinate
Gets the coordinate of this LevelObject.- Returns:
- LevelObject Coordinate
-
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<LevelObject>
-