From bed87c7d8a7264fb923727238ef1317d42c19d34 Mon Sep 17 00:00:00 2001 From: paulevsGitch Date: Tue, 15 Feb 2022 15:03:50 +0300 Subject: [PATCH] Multithread hexmap --- .../java/ru/bclib/world/generator/map/hex/HexBiomeMap.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/ru/bclib/world/generator/map/hex/HexBiomeMap.java b/src/main/java/ru/bclib/world/generator/map/hex/HexBiomeMap.java index 85331593..5f71c68d 100644 --- a/src/main/java/ru/bclib/world/generator/map/hex/HexBiomeMap.java +++ b/src/main/java/ru/bclib/world/generator/map/hex/HexBiomeMap.java @@ -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; @@ -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 { @@ -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 chunks = new HashMap<>(); + private final Map chunks = Maps.newConcurrentMap(); private final BiomePicker picker; private final OpenSimplexNoise[] noises = new OpenSimplexNoise[2];