This commit is contained in:
cyberpwn 2021-08-17 17:26:38 -04:00
parent e279dc4cea
commit 6343b7087d

View File

@ -52,6 +52,8 @@ import java.util.concurrent.Semaphore;
@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 final Semaphore loadLock;
private final Engine engine; private final Engine engine;
private final IrisWorld world; private final IrisWorld world;
private final File dataLocation; private final File dataLocation;
@ -64,6 +66,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
public BukkitChunkGenerator(IrisWorld world, boolean studio, File dataLocation, String dimensionKey) { public BukkitChunkGenerator(IrisWorld world, boolean studio, File dataLocation, String dimensionKey) {
populators = new KList<>(); populators = new KList<>();
loadLock = new Semaphore(LOAD_LOCKS);
this.world = world; this.world = world;
this.hotloadChecker = new ChronoLatch(1000, false); this.hotloadChecker = new ChronoLatch(1000, false);
this.studio = studio; this.studio = studio;