From 127724b23fa7b29ba8ca3b112235b20769097200 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:25:04 +0200 Subject: [PATCH] Update BlockStressDefaults to use thread-safe maps #6579 by ByThePowerOfScience --- .../create/content/kinetics/BlockStressDefaults.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/kinetics/BlockStressDefaults.java b/src/main/java/com/simibubi/create/content/kinetics/BlockStressDefaults.java index 16fb0cd2e..3b1db16a8 100644 --- a/src/main/java/com/simibubi/create/content/kinetics/BlockStressDefaults.java +++ b/src/main/java/com/simibubi/create/content/kinetics/BlockStressDefaults.java @@ -1,7 +1,7 @@ package com.simibubi.create.content.kinetics; -import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import java.util.function.Supplier; import com.simibubi.create.foundation.utility.Couple; @@ -20,9 +20,9 @@ public class BlockStressDefaults { */ public static final int FORCED_UPDATE_VERSION = 2; - public static final Map DEFAULT_IMPACTS = new HashMap<>(); - public static final Map DEFAULT_CAPACITIES = new HashMap<>(); - public static final Map>> GENERATOR_SPEEDS = new HashMap<>(); + public static final Map DEFAULT_IMPACTS = new ConcurrentHashMap<>(); + public static final Map DEFAULT_CAPACITIES = new ConcurrentHashMap<>(); + public static final Map>> GENERATOR_SPEEDS = new ConcurrentHashMap<>(); public static void setDefaultImpact(ResourceLocation blockId, double impact) { DEFAULT_IMPACTS.put(blockId, impact);