Skip to content

Commit

Permalink
check if the loader loaded
Browse files Browse the repository at this point in the history
better solutions?
  • Loading branch information
Ecdcaeb committed Jan 1, 2025
1 parent 15740ad commit 91f2fd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/zone/rong/mixinbooter/Context.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package zone.rong.mixinbooter;

import net.minecraft.launchwrapper.Launch;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;

Expand Down Expand Up @@ -72,7 +73,7 @@ public String mixinConfig() {
* @return whether the mod is present
*/
public boolean isModPresent(String modId) {
return Loader.isModLoaded(modId);
return Launch.classLoader.isClassLoaded("net.minecraftforge.fml.common.Loader") && Loader.isModLoaded(modId);
}

}

0 comments on commit 91f2fd4

Please sign in to comment.