9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-26 18:49:06 +00:00
This commit is contained in:
DanMB
2022-06-04 23:32:01 -07:00
parent ce8cc2cf37
commit fcee61a703

View File

@@ -64,7 +64,7 @@ import java.util.function.Consumer;
@EqualsAndHashCode(callSuper = true)
@Data
public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChunkGenerator {
private static final int LOAD_LOCKS = 1_000_000;
private static final int LOAD_LOCKS = Runtime.getRuntime().availableProcessors() * 4;
private final Semaphore loadLock;
private final IrisWorld world;
private final File dataLocation;
@@ -270,7 +270,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
public @NotNull ChunkData generateChunkData(@NotNull World world, @NotNull Random ignored, int x, int z, @NotNull BiomeGrid biome) {
try {
getEngine(world);
//loadLock.acquire();
loadLock.acquire();
computeStudioGenerator();
TerrainChunk tc = TerrainChunk.create(world, biome);
this.world.bind(world);
@@ -285,10 +285,10 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
ChunkData c = tc.getRaw();
Iris.debug("Generated " + x + " " + z);
//loadLock.release();
loadLock.release();
return c;
} catch(Throwable e) {
//loadLock.release();
loadLock.release();
Iris.error("======================================");
e.printStackTrace();
Iris.reportErrorChunk(x, z, e, "CHUNK");