mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -04:00
fix ArrayOutOufBoundsException when 3d biomes are supported in 19w36a+
This commit is contained in:
parent
b72f40e01a
commit
e5e71bf1cb
@ -20,7 +20,7 @@ import glm_.vec3.Vec3i
|
|||||||
class SpatialBiomeArray(private val data: Array<Biome>) : BiomeSource {
|
class SpatialBiomeArray(private val data: Array<Biome>) : BiomeSource {
|
||||||
|
|
||||||
override fun getBiome(position: Vec3i): Biome {
|
override fun getBiome(position: Vec3i): Biome {
|
||||||
val index = (MMath.clamp(position.y, 0, Y_BIT_MASK)) shl 2 * X_SECTION_COUNT + X_SECTION_COUNT or
|
val index = (MMath.clamp(position.y, 0, Y_BIT_MASK)) shl X_SECTION_COUNT + X_SECTION_COUNT or
|
||||||
((position.z and X_BIT_MASK) shl X_SECTION_COUNT) or
|
((position.z and X_BIT_MASK) shl X_SECTION_COUNT) or
|
||||||
(position.x and X_BIT_MASK)
|
(position.x and X_BIT_MASK)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user