use ChunkLocalCachingBiomeProvider

This commit is contained in:
dfsek
2022-06-11 21:50:04 -07:00
parent d58eb699f1
commit 881477c42f
3 changed files with 7 additions and 2 deletions

View File

@@ -99,4 +99,8 @@ public interface BiomeProvider {
default CachingBiomeProvider caching(WorldProperties worldProperties) {
return caching(worldProperties.getMinHeight(), worldProperties.getMaxHeight());
}
default ChunkLocalCachingBiomeProvider caching(WorldProperties worldProperties, int chunkX, int chunkZ) {
return new ChunkLocalCachingBiomeProvider(this, worldProperties, chunkX, chunkZ);
}
}

View File

@@ -19,7 +19,7 @@ import java.util.Optional;
*/
public class ChunkLocalCachingBiomeProvider extends CachingBiomeProvider {
private final Biome[][][] cache;
private final Column<Biome>[][] columnCache = new Column<>[16][16];
private final Column<Biome>[][] columnCache = new Column[16][16];
private final int chunkX;
private final int chunkZ;