Skip to content

Commit

Permalink
Multithread hexmap
Browse files Browse the repository at this point in the history
  • Loading branch information
paulevsGitch committed Feb 15, 2022
1 parent 51e787c commit bed87c7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package ru.bclib.world.generator.map.hex;

import com.google.common.collect.Maps;
import net.minecraft.world.level.ChunkPos;
import ru.bclib.interfaces.BiomeChunk;
import ru.bclib.interfaces.BiomeMap;
Expand All @@ -9,8 +10,7 @@
import ru.bclib.world.biomes.BCLBiome;
import ru.bclib.world.generator.BiomePicker;

import java.awt.Point;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;

public class HexBiomeMap implements BiomeMap {
Expand All @@ -22,7 +22,7 @@ public class HexBiomeMap implements BiomeMap {
private static final float[] EDGE_CIRCLE_X;
private static final float[] EDGE_CIRCLE_Z;

private final HashMap<ChunkPos, HexBiomeChunk> chunks = new HashMap<>();
private final Map<ChunkPos, HexBiomeChunk> chunks = Maps.newConcurrentMap();
private final BiomePicker picker;

private final OpenSimplexNoise[] noises = new OpenSimplexNoise[2];
Expand Down

0 comments on commit bed87c7

Please sign in to comment.