mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-17 14:21:33 +00:00
fg
This commit is contained in:
@@ -64,7 +64,7 @@ import java.util.function.Consumer;
|
|||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChunkGenerator {
|
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 Semaphore loadLock;
|
||||||
private final IrisWorld world;
|
private final IrisWorld world;
|
||||||
private final File dataLocation;
|
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) {
|
public @NotNull ChunkData generateChunkData(@NotNull World world, @NotNull Random ignored, int x, int z, @NotNull BiomeGrid biome) {
|
||||||
try {
|
try {
|
||||||
getEngine(world);
|
getEngine(world);
|
||||||
//loadLock.acquire();
|
loadLock.acquire();
|
||||||
computeStudioGenerator();
|
computeStudioGenerator();
|
||||||
TerrainChunk tc = TerrainChunk.create(world, biome);
|
TerrainChunk tc = TerrainChunk.create(world, biome);
|
||||||
this.world.bind(world);
|
this.world.bind(world);
|
||||||
@@ -285,10 +285,10 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
|||||||
|
|
||||||
ChunkData c = tc.getRaw();
|
ChunkData c = tc.getRaw();
|
||||||
Iris.debug("Generated " + x + " " + z);
|
Iris.debug("Generated " + x + " " + z);
|
||||||
//loadLock.release();
|
loadLock.release();
|
||||||
return c;
|
return c;
|
||||||
} catch(Throwable e) {
|
} catch(Throwable e) {
|
||||||
//loadLock.release();
|
loadLock.release();
|
||||||
Iris.error("======================================");
|
Iris.error("======================================");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Iris.reportErrorChunk(x, z, e, "CHUNK");
|
Iris.reportErrorChunk(x, z, e, "CHUNK");
|
||||||
|
|||||||
Reference in New Issue
Block a user