Skip to content

Commit 127724b

Browse files
committed
Update BlockStressDefaults to use thread-safe maps
Creators-of-Create#6579 by ByThePowerOfScience
1 parent 08b5515 commit 127724b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/simibubi/create/content/kinetics/BlockStressDefaults.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.simibubi.create.content.kinetics;
22

3-
import java.util.HashMap;
43
import java.util.Map;
4+
import java.util.concurrent.ConcurrentHashMap;
55
import java.util.function.Supplier;
66

77
import com.simibubi.create.foundation.utility.Couple;
@@ -20,9 +20,9 @@ public class BlockStressDefaults {
2020
*/
2121
public static final int FORCED_UPDATE_VERSION = 2;
2222

23-
public static final Map<ResourceLocation, Double> DEFAULT_IMPACTS = new HashMap<>();
24-
public static final Map<ResourceLocation, Double> DEFAULT_CAPACITIES = new HashMap<>();
25-
public static final Map<ResourceLocation, Supplier<Couple<Integer>>> GENERATOR_SPEEDS = new HashMap<>();
23+
public static final Map<ResourceLocation, Double> DEFAULT_IMPACTS = new ConcurrentHashMap<>();
24+
public static final Map<ResourceLocation, Double> DEFAULT_CAPACITIES = new ConcurrentHashMap<>();
25+
public static final Map<ResourceLocation, Supplier<Couple<Integer>>> GENERATOR_SPEEDS = new ConcurrentHashMap<>();
2626

2727
public static void setDefaultImpact(ResourceLocation blockId, double impact) {
2828
DEFAULT_IMPACTS.put(blockId, impact);

0 commit comments

Comments
 (0)