Height fixes

This commit is contained in:
cyberpwn
2022-01-12 01:24:12 -05:00
parent 32dac5fbe2
commit 8c00499e76
6 changed files with 20 additions and 17 deletions

View File

@@ -145,7 +145,7 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
@BlockCoordinates
default void generate(int x, int z, TerrainChunk tc, boolean multicore) throws WrongEngineBroException {
generate(x, z, Hunk.view((ChunkGenerator.ChunkData) tc), Hunk.view((ChunkGenerator.BiomeGrid) tc), multicore);
generate(x, z, Hunk.view((ChunkGenerator.ChunkData) tc), Hunk.view((ChunkGenerator.BiomeGrid) tc, tc.getMinHeight(), tc.getMaxHeight()), multicore);
}
@BlockCoordinates

View File

@@ -139,7 +139,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
IrisBiomeStorage st = new IrisBiomeStorage();
TerrainChunk tc = TerrainChunk.createUnsafe(world, st);
Hunk<BlockData> blocks = Hunk.view((ChunkData) tc);
Hunk<Biome> biomes = Hunk.view((BiomeGrid) tc);
Hunk<Biome> biomes = Hunk.view((BiomeGrid) tc, tc.getMinHeight(), tc.getMaxHeight());
this.world.bind(world);
getEngine().generate(x << 4, z << 4, blocks, biomes, true);
Iris.debug("Regenerated " + x + " " + z);
@@ -284,7 +284,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
studioGenerator.generateChunk(getEngine(), tc, x, z);
} else {
Hunk<BlockData> blocks = Hunk.view((ChunkData) tc);
Hunk<Biome> biomes = Hunk.view((BiomeGrid) tc);
Hunk<Biome> biomes = Hunk.view((BiomeGrid) tc, tc.getMinHeight(), tc.getMaxHeight());
getEngine().generate(x << 4, z << 4, blocks, biomes, true);
}

View File

@@ -86,7 +86,7 @@ public class HeadlessGenerator implements PlatformChunkGenerator {
INMS.get().getTrueBiomeBaseId(biomeBase)))
.build();
getEngine().generate(x << 4, z << 4,
Hunk.view((ChunkGenerator.ChunkData) tc), Hunk.view((ChunkGenerator.BiomeGrid) tc),
Hunk.view((ChunkGenerator.ChunkData) tc), Hunk.view((ChunkGenerator.BiomeGrid) tc, tc.getMinHeight(), tc.getMaxHeight()),
false);
chunk.cleanupPalettesAndBlockStates();
} catch (Throwable e) {