Skip to content

Commit

Permalink
Update BlockStressDefaults to use thread-safe maps
Browse files Browse the repository at this point in the history
#6579 by ByThePowerOfScience
  • Loading branch information
simibubi committed Jul 16, 2024
1 parent 08b5515 commit 127724b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -20,9 +20,9 @@ public class BlockStressDefaults {
*/
public static final int FORCED_UPDATE_VERSION = 2;

public static final Map<ResourceLocation, Double> DEFAULT_IMPACTS = new HashMap<>();
public static final Map<ResourceLocation, Double> DEFAULT_CAPACITIES = new HashMap<>();
public static final Map<ResourceLocation, Supplier<Couple<Integer>>> GENERATOR_SPEEDS = new HashMap<>();
public static final Map<ResourceLocation, Double> DEFAULT_IMPACTS = new ConcurrentHashMap<>();
public static final Map<ResourceLocation, Double> DEFAULT_CAPACITIES = new ConcurrentHashMap<>();
public static final Map<ResourceLocation, Supplier<Couple<Integer>>> GENERATOR_SPEEDS = new ConcurrentHashMap<>();

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

0 comments on commit 127724b

Please sign in to comment.