fix Chunk.allBlocks height (#39)

Fixes Chunk.allBlocks crashing when using it in the nether.
This commit is contained in:
Krxwallo
2022-02-21 16:11:51 +01:00
committed by GitHub
parent 14bb952f1c
commit 4b479af96f

View File

@@ -18,7 +18,7 @@ val Location.worldOrException: World
*/
val Chunk.allBlocks
get() = LinkedHashSet<Block>().apply {
for (y in -64 until 320) {
for (y in world.minHeight until world.maxHeight) {
for (x in 0 until 16)
for (z in 0 until 16)
add(getBlock(x, y, z))