-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ModMixin annotation for both Forge and Fabric due to incorrect cl…
…ass load order
- Loading branch information
Showing
3 changed files
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
forge/src/main/java/com/copycatsplus/copycats/compat/forge/ModsImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
package com.copycatsplus.copycats.compat.forge; | ||
|
||
import net.minecraftforge.fml.ModList; | ||
import net.minecraftforge.fml.loading.FMLLoader; | ||
|
||
public class ModsImpl { | ||
|
||
|
||
public static boolean getLoaded(String id) { | ||
// If ModList is null, we are in the loading stage, so we need to check the loading mod list | ||
if (ModList.get() == null) | ||
return FMLLoader.getLoadingModList().getMods().stream().anyMatch(mod -> mod.getModId().equals(id)); | ||
return ModList.get().isLoaded(id); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters