Hashmap fix (#102)
This commit is contained in:
parent
39d5f58f0c
commit
e013f80912
2 changed files with 7 additions and 5 deletions
|
@ -11,7 +11,7 @@ loader_version= 0.12.12
|
|||
fabric_version = 0.46.2+1.18
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.3.3
|
||||
mod_version = 1.3.4
|
||||
maven_group = ru.bclib
|
||||
archives_base_name = bclib
|
||||
|
||||
|
|
|
@ -75,14 +75,16 @@ public class HexBiomeMap implements BiomeMap {
|
|||
@Override
|
||||
public BiomeChunk getChunk(final int cx, final int cz, final boolean update) {
|
||||
final ChunkPos pos = new ChunkPos(cx, cz);
|
||||
return chunks.computeIfAbsent(pos, i -> {
|
||||
HexBiomeChunk chunk = chunks.get(pos);
|
||||
if (chunk == null) {
|
||||
Random random = new Random(MHelper.getSeed(seed, cx, cz));
|
||||
HexBiomeChunk chunk = new HexBiomeChunk(random, picker);
|
||||
chunk = new HexBiomeChunk(random, picker);
|
||||
if (update && processor != null) {
|
||||
processor.accept(cx, cz, chunk.getSide());
|
||||
}
|
||||
return chunk;
|
||||
});
|
||||
chunks.put(pos, chunk);
|
||||
}
|
||||
return chunk;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue