Made sure alternator was semi-multithread safe.
This commit is contained in:
parent
533a758799
commit
66673e2f52
@ -21,11 +21,10 @@ public class IslandWorldGeneratorAlternator {
|
|||||||
this.islandBiomeGenerator = biomeGenerator;
|
this.islandBiomeGenerator = biomeGenerator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IslandWorldGenerator getIslandChunkGeneratorSystemForWorld(World world, Random random) {
|
public synchronized IslandWorldGenerator getIslandChunkGeneratorSystemForWorld(World world, Random random) {
|
||||||
if (!chunkGenerator.containsKey(world.getUID())) {
|
if (!chunkGenerator.containsKey(world.getUID())) {
|
||||||
chunkGenerator.put(world.getUID(), new IslandWorldGenerator(world, islandBiomeGenerator.getInstance(), random));
|
chunkGenerator.put(world.getUID(), new IslandWorldGenerator(world, islandBiomeGenerator.getInstance(), random));
|
||||||
}
|
}
|
||||||
|
|
||||||
return chunkGenerator.get(world.getUID());
|
return chunkGenerator.get(world.getUID());
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user