mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-19 12:25:12 -04:00
fix crash when calculating world brightness
* Happens when you go under water
This commit is contained in:
parent
05a0e335b0
commit
0e2df28bd3
@ -403,7 +403,7 @@ class World(
|
||||
|
||||
fun getBrightness(position: BlockPosition): Float {
|
||||
val light = getLight(position)
|
||||
val level = maxOf(light and 0x0F, light and 0xF0)
|
||||
val level = maxOf(light and 0x0F, light and 0xF0 shr 4)
|
||||
return dimension?.lightLevels?.get(level) ?: 0.0f
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user