Merge remote-tracking branch 'architectury/1.18' into 1.18.2

This commit is contained in:
shedaniel
2022-02-27 18:13:36 +08:00
2 changed files with 4 additions and 1 deletions

View File

@@ -39,6 +39,9 @@
"fabricloader": ">=0.13.0",
"fabric": ">=0.44.0"
},
"breaks": {
"optifabric": "*"
},
"custom": {
"modmenu:api": true
}

View File

@@ -32,7 +32,7 @@ public final class EventBuses {
private static final Map<String, List<Consumer<IEventBus>>> ON_REGISTERED = new HashMap<>();
public static void registerModEventBus(String modId, IEventBus bus) {
if (EVENT_BUS_MAP.putIfAbsent(modId, bus) != bus) {
if (EVENT_BUS_MAP.putIfAbsent(modId, bus) != null) {
throw new IllegalStateException("Can't register event bus for mod '" + modId + "' because it was previously registered!");
}