mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 19:05:02 -04:00
invalidate skylight heightmap when dimension is not capable of skylight
This commit is contained in:
parent
6ac207e3ef
commit
26292ddb55
@ -29,7 +29,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolDefinition
|
|||||||
|
|
||||||
class ChunkLight(private val chunk: Chunk) {
|
class ChunkLight(private val chunk: Chunk) {
|
||||||
private val connection = chunk.connection
|
private val connection = chunk.connection
|
||||||
val heightmap = IntArray(ProtocolDefinition.SECTION_WIDTH_X * ProtocolDefinition.SECTION_WIDTH_Z) { Int.MIN_VALUE }
|
val heightmap = IntArray(ProtocolDefinition.SECTION_WIDTH_X * ProtocolDefinition.SECTION_WIDTH_Z) { if (chunk.world.dimension.canSkylight()) Int.MIN_VALUE else Int.MAX_VALUE }
|
||||||
|
|
||||||
val bottom = BorderSectionLight(false, chunk)
|
val bottom = BorderSectionLight(false, chunk)
|
||||||
val top = BorderSectionLight(true, chunk)
|
val top = BorderSectionLight(true, chunk)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user