Skip to content

Commit

Permalink
Fix concurrent exception, closes #130
Browse files Browse the repository at this point in the history
  • Loading branch information
TheIllusiveC4 committed Oct 1, 2024
1 parent 1f1eb29 commit e18f08a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
Expand All @@ -30,7 +31,7 @@

public class FabricPlatform implements IPlatform {

private static final Map<String, Boolean> CACHE = new HashMap<>();
private static final Map<String, Boolean> CACHE = new ConcurrentHashMap<>();

@Override
public boolean isModLoaded(String id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import javax.annotation.Nonnull;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
Expand All @@ -29,7 +30,7 @@

public class ForgePlatform implements IPlatform {

private static final Map<String, Boolean> CACHE = new HashMap<>();
private static final Map<String, Boolean> CACHE = new ConcurrentHashMap<>();

@Override
public boolean isModLoaded(String id) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
Expand All @@ -29,7 +30,7 @@

public class QuiltPlatform implements IPlatform {

private static final Map<String, Boolean> CACHE = new HashMap<>();
private static final Map<String, Boolean> CACHE = new ConcurrentHashMap<>();

@Override
public boolean isModLoaded(String id) {
Expand Down

0 comments on commit e18f08a

Please sign in to comment.