mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-17 14:21:33 +00:00
Test speed
This commit is contained in:
@@ -299,7 +299,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
|||||||
} else {
|
} else {
|
||||||
ChunkDataHunkHolder blocks = new ChunkDataHunkHolder(tc);
|
ChunkDataHunkHolder blocks = new ChunkDataHunkHolder(tc);
|
||||||
BiomeGridHunkHolder biomes = new BiomeGridHunkHolder(tc, tc.getMinHeight(), tc.getMaxHeight());
|
BiomeGridHunkHolder biomes = new BiomeGridHunkHolder(tc, tc.getMinHeight(), tc.getMaxHeight());
|
||||||
getEngine().generate(x << 4, z << 4, blocks, biomes, true);
|
getEngine().generate(x << 4, z << 4, blocks, biomes, false);
|
||||||
blocks.apply();
|
blocks.apply();
|
||||||
biomes.apply();
|
biomes.apply();
|
||||||
}
|
}
|
||||||
@@ -324,50 +324,6 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
|||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public @NotNull ChunkData generateChunkData(@NotNull World world, @NotNull Random ignored, int x, int z, @NotNull BiomeGrid biome) {
|
|
||||||
if(true) {
|
|
||||||
super.generateChunkData(world, ignored, x, z, biome);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
getEngine(world);
|
|
||||||
computeStudioGenerator();
|
|
||||||
TerrainChunk tc = TerrainChunk.create(world, biome);
|
|
||||||
this.world.bind(world);
|
|
||||||
|
|
||||||
if(studioGenerator != null) {
|
|
||||||
studioGenerator.generateChunk(getEngine(), tc, x, z);
|
|
||||||
} else {
|
|
||||||
ChunkDataHunkHolder blocks = new ChunkDataHunkHolder(tc);
|
|
||||||
BiomeGridHunkHolder biomes = new BiomeGridHunkHolder(tc, tc.getMinHeight(), tc.getMaxHeight());
|
|
||||||
getEngine().generate(x << 4, z << 4, blocks, biomes, true);
|
|
||||||
blocks.apply();
|
|
||||||
biomes.apply();
|
|
||||||
}
|
|
||||||
|
|
||||||
ChunkData c = tc.getRaw();
|
|
||||||
Iris.debug("Generated " + x + " " + z);
|
|
||||||
|
|
||||||
return c;
|
|
||||||
} catch(Throwable e) {
|
|
||||||
Iris.error("======================================");
|
|
||||||
e.printStackTrace();
|
|
||||||
Iris.reportErrorChunk(x, z, e, "CHUNK");
|
|
||||||
Iris.error("======================================");
|
|
||||||
|
|
||||||
ChunkData d = Bukkit.createChunkData(world);
|
|
||||||
|
|
||||||
for(int i = 0; i < 16; i++) {
|
|
||||||
for(int j = 0; j < 16; j++) {
|
|
||||||
d.setBlock(i, 0, j, Material.RED_GLAZED_TERRACOTTA.createBlockData());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return d;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void computeStudioGenerator() {
|
private void computeStudioGenerator() {
|
||||||
if(!getEngine().getDimension().getStudioMode().equals(lastMode)) {
|
if(!getEngine().getDimension().getStudioMode().equals(lastMode)) {
|
||||||
lastMode = getEngine().getDimension().getStudioMode();
|
lastMode = getEngine().getDimension().getStudioMode();
|
||||||
|
|||||||
Reference in New Issue
Block a user