Skip to content

Commit

Permalink
only apply source hackery in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
brachy84 committed Jul 24, 2024
1 parent 7db8288 commit c929c7e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@
import net.minecraftforge.fml.common.DummyModContainer;
import net.minecraftforge.fml.common.LoadController;
import net.minecraftforge.fml.relauncher.FMLInjectionData;
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;

import java.io.File;

public class ScriptModContainer extends DummyModContainer {

public ScriptModContainer() {
super(RunConfig.modMetadata);
// fixes error when forge tries to find a mod jar inside classgraph
Launch.classLoader.getSources().removeIf(url -> url.toString().contains("io.github.classgraph"));
if (FMLLaunchHandler.isDeobfuscatedEnvironment()) {
// fixes error when forge tries to find a mod jar inside classgraph
Launch.classLoader.getSources().removeIf(url -> url.toString().contains("io.github.classgraph"));
}
GroovyScript.initializeRunConfig((File) FMLInjectionData.data()[6]);
}

Expand Down

0 comments on commit c929c7e

Please sign in to comment.