Interface ColumnPosition
public sealed interface ColumnPosition
An immutable pair of block X and Z coordinates, pointing at a column of blocks.
- Since:
- 0.1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault BlockPositionatY(int y) Gets the block of this column at the given height.default ChunkPoschunk()Gets the position of the chunk containing this column.default intchunkX()Gets the X coordinate of the chunk containing this column.default intchunkZ()Gets the Z coordinate of the chunk containing this column.static ColumnPositioncolumn(int x, int z) Creates a column position at the given coordinates.offset(int x, int z) Moves this column along both axes.offsetX(int x) Moves this column along the X axis.offsetZ(int z) Moves this column along the Z axis.with(int x, int z) Copies this column with different coordinates.withX(int x) Copies this column with a different X coordinate.withZ(int z) Copies this column with a different Z coordinate.intx()Gets the X coordinate of this column.intz()Gets the Z coordinate of this column.
-
Method Details
-
column
Creates a column position at the given coordinates.- Parameters:
x- the block X coordinatez- the block Z coordinate- Returns:
- a new column position at the given coordinates
- Since:
- 0.1.0
-
x
-
z
-
offsetX
Moves this column along the X axis.- Parameters:
x- the amount to add to the X coordinate- Returns:
- a new column with the given amount added to the X coordinate
- Since:
- 0.1.0
-
offsetZ
Moves this column along the Z axis.- Parameters:
z- the amount to add to the Z coordinate- Returns:
- a new column with the given amount added to the Z coordinate
- Since:
- 0.1.0
-
offset
Moves this column along both axes.- Parameters:
x- the amount to add to the X coordinatez- the amount to add to the Z coordinate- Returns:
- a new column with the given amounts added to each coordinate
- Since:
- 0.1.0
-
withX
Copies this column with a different X coordinate.- Parameters:
x- the new X coordinate- Returns:
- a new column with the X coordinate replaced
- Since:
- 0.1.0
-
withZ
Copies this column with a different Z coordinate.- Parameters:
z- the new Z coordinate- Returns:
- a new column with the Z coordinate replaced
- Since:
- 0.1.0
-
with
Copies this column with different coordinates.- Parameters:
x- the new X coordinatez- the new Z coordinate- Returns:
- a new column with both coordinates replaced
- Since:
- 0.1.0
-
atY
Gets the block of this column at the given height.- Parameters:
y- the block Y coordinate- Returns:
- a new block position in this column at the given height
- Since:
- 0.1.0
-
chunk
-
chunkX
-
chunkZ
-