fix fast biomes

This commit is contained in:
Bixilon 2021-11-15 15:55:16 +01:00
parent 2ecf73b82e
commit 69bd39bd45
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 8 additions and 2 deletions

View File

@ -9,7 +9,7 @@
- 3 Meshes per section (opaque; transparent; translucent)
- Preparing in nearer to further away order
- unload meshes if block changed and not in frustum
- only prepare if chunk is in frustum
- only prepare if chunk is in frust
- don't prepare empty chunks
- Light
- Client side light engine
@ -40,3 +40,9 @@
- Greedy meshing
- Model deciding (for pre flattening versions)
- Assets manager: Create file from jar with all models inside and load models from there (make them moddable)
- ToDo:
- Unshelve
- Thread safety
- Build biome cache only in render distance

View File

@ -36,7 +36,7 @@ class NoiseBiomeAccessor(private val world: World) {
return null
}
return it.data[(biomeY / 4) * 16 + (((z and 0x0F) / 4) * 4 + ((x and 0x0F) / 4))]
return it.data[(biomeY and 0x0F) shr 2 and 0x3F shl 4 or ((z and 0x0F) shr 2 and 0x03 shl 2) or ((x and 0x0F) shr 2 and 0x03)]
}
return null
}