mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-19 04:15:14 -04:00
chunk: silently ignore section requests if chunk is not initialized yet
This commit is contained in:
parent
84534c2d9f
commit
7a9ee5779d
@ -172,7 +172,7 @@ class Chunk(
|
||||
|
||||
@Synchronized
|
||||
private fun getOrPut(sectionHeight: Int): ChunkSection? {
|
||||
val sections = sections ?: throw NullPointerException("Sections not initialized yet!")
|
||||
val sections = sections ?: return null
|
||||
val sectionIndex = sectionHeight - lowestSection
|
||||
if (sectionIndex < 0 || sectionIndex > sections.size) {
|
||||
return null
|
||||
|
Loading…
x
Reference in New Issue
Block a user