Fix crash with multitread random
This commit is contained in:
parent
8b89808634
commit
9bde4c11b9
2 changed files with 5 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
package ru.bclib.api.biomes;
|
||||
package ru.bclib.interfaces;
|
||||
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
|
@ -103,8 +103,10 @@ public class SquareBiomeMap implements BiomeMap {
|
|||
ChunkPos cpos = new ChunkPos(MHelper.floor(x / SquareBiomeChunk.WIDTH), MHelper.floor(z / SquareBiomeChunk.WIDTH));
|
||||
SquareBiomeChunk chunk = maps.get(cpos);
|
||||
if (chunk == null) {
|
||||
synchronized (random) {
|
||||
random.setLargeFeatureWithSalt(0, cpos.x, cpos.z, 0);
|
||||
chunk = new SquareBiomeChunk(random, picker);
|
||||
}
|
||||
maps.put(cpos, chunk);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue