Interface GeneratedChunk
public interface GeneratedChunk
The chunk a
WorldGenerator fills.
X and Z coordinates are local to the chunk (0 to 15); Y coordinates are
absolute. Out-of-range coordinates throw IllegalArgumentException.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionblockAt(int x, int y, int z) Reads back a block placed so far.intchunkX()Returns the chunk X coordinate.intchunkZ()Returns the chunk Z coordinate.intheight()Returns the number of block layers, starting atminY().intminY()Returns the lowest block Y coordinate, inclusive.voidSets the biome of the 4x4x4 cell holding a block.default voidPlaces a block state.default voidPlaces the default state of a block.voidPlaces a block state.
-
Method Details
-
chunkX
int chunkX()Returns the chunk X coordinate.- Returns:
- the chunk X coordinate
- Since:
- 0.1.0
-
chunkZ
int chunkZ()Returns the chunk Z coordinate.- Returns:
- the chunk Z coordinate
- Since:
- 0.1.0
-
minY
int minY()Returns the lowest block Y coordinate, inclusive.- Returns:
- the lowest block Y coordinate, inclusive
- Since:
- 0.1.0
-
height
-
setBlock
Places the default state of a block.- Parameters:
x- the X coordinate inside the chunk,0to15y- the absolute Y coordinatez- the Z coordinate inside the chunk,0to15block- the block key- Since:
- 0.1.0
-
setBlock
Places a block state. Properties that are not given keep their default value.- Parameters:
x- the X coordinate inside the chunk,0to15y- the absolute Y coordinatez- the Z coordinate inside the chunk,0to15block- the block keyproperties- property name to value, e.g.half=upper- Since:
- 0.1.0
-
setBlock
Places a block state.- Parameters:
x- the X coordinate inside the chunk,0to15y- the absolute Y coordinatez- the Z coordinate inside the chunk,0to15data- the block state- Since:
- 0.1.0
-
blockAt
Reads back a block placed so far.- Parameters:
x- the X coordinate inside the chunk,0to15y- the absolute Y coordinatez- the Z coordinate inside the chunk,0to15- Returns:
- the key of the block currently stored at the position
- Since:
- 0.1.0
-
setBiome
Sets the biome of the 4x4x4 cell holding a block.- Parameters:
x- the X coordinate inside the chunk,0to15y- the absolute Y coordinatez- the Z coordinate inside the chunk,0to15biome- the biome key, registered in theBiomeRegistry- Since:
- 0.1.0
-