Skip to content

Commit

Permalink
Fixes #84 + Fixes #110 (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rongmario authored Feb 11, 2024
1 parent 7f0ef0e commit e669145
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
import zone.rong.mixinbooter.IEarlyMixinLoader;

import javax.annotation.Nullable;
import java.io.File;
import java.util.List;
import java.util.Map;

@IFMLLoadingPlugin.Name("GroovyScript-Core")
@IFMLLoadingPlugin.MCVersion(ForgeVersion.mcVersion)
public class GroovyScriptCore implements IFMLLoadingPlugin, IEarlyMixinLoader {

public static File source;

@Override
public String[] getASMTransformerClass() {
return new String[0];
Expand All @@ -31,6 +34,7 @@ public String getSetupClass() {

@Override
public void injectData(Map<String, Object> data) {
source = (File) data.getOrDefault("coremodLocation", null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.cleanroommc.groovyscript.sandbox;

import com.cleanroommc.groovyscript.GroovyScript;
import com.cleanroommc.groovyscript.core.GroovyScriptCore;
import com.google.common.eventbus.EventBus;
import net.minecraftforge.fml.common.DummyModContainer;
import net.minecraftforge.fml.common.LoadController;
Expand All @@ -10,17 +11,14 @@

public class ScriptModContainer extends DummyModContainer {

private final File source;

public ScriptModContainer() {
super(RunConfig.modMetadata);
this.source = (File) FMLInjectionData.data()[6];
GroovyScript.initializeRunConfig(this.source);
GroovyScript.initializeRunConfig((File) FMLInjectionData.data()[6]);
}

@Override
public File getSource() {
return source;
return GroovyScriptCore.source;
}

@Override
Expand Down

0 comments on commit e669145

Please sign in to comment.