remove world instance from BukkitChunkGeneratorWrapper

This commit is contained in:
dfsek
2021-12-24 00:08:45 -07:00
parent 5da0a861b6
commit 6729565a59
4 changed files with 41 additions and 16 deletions
@@ -53,10 +53,10 @@ public class NoiseChunkGenerator3D implements ChunkGenerator {
@Override
@SuppressWarnings("try")
public void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WritableWorld world,
public void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WorldProperties world,
int chunkX, int chunkZ) {
try(ProfileFrame ignore = platform.getProfiler().profile("chunk_base_3d")) {
BiomeProvider grid = world.getBiomeProvider();
BiomeProvider grid = configPack.getBiomeProvider();
int xOrig = (chunkX << 4);
int zOrig = (chunkZ << 4);
@@ -65,7 +65,7 @@ public class NoiseChunkGenerator3D implements ChunkGenerator {
long seed = world.getSeed();
LazilyEvaluatedInterpolator carver = new LazilyEvaluatedInterpolator(world.getBiomeProvider(),
LazilyEvaluatedInterpolator carver = new LazilyEvaluatedInterpolator(configPack.getBiomeProvider(),
chunkX,
chunkZ,
world.getMaxHeight(),
@@ -18,7 +18,7 @@ import com.dfsek.terra.api.world.WritableWorld;
public interface ChunkGenerator {
void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WritableWorld world,
void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WorldProperties world,
int chunkX, int chunkZ);
BlockState getBlock(WorldProperties world, int x, int y, int z);