Skip to content

Commit

Permalink
try support Groovy but fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Ecdcaeb committed Mar 3, 2024
1 parent 7cd8a72 commit d46bf07
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/mods/Hileb/rml/RMLModContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import net.minecraftforge.fml.common.InjectedModContainer;
import net.minecraftforge.fml.common.LoadController;
import net.minecraftforge.fml.common.ModMetadata;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.io.File;

Expand All @@ -16,9 +18,10 @@
**/
@PrivateAPI
public class RMLModContainer extends InjectedModContainer {
public final Logger LOGGER;
public RMLModContainer(ModMetadata metadata,File source) {
super(new DummyModContainer(metadata), source);
//ResourceModLoader.containers.add(this);
LOGGER = LogManager.getLogger(metadata.modId);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package mods.Hileb.rml.compat.groovyscript;

import com.cleanroommc.groovyscript.GroovyScript;
import com.cleanroommc.groovyscript.sandbox.GroovySandbox;
import com.google.gson.JsonObject;
import net.minecraftforge.fml.common.ModContainer;

import java.io.File;

/**
* @Project ResourceModLoader
* @Author Hileb
* @Date 2024/3/3 11:24
**/
public class GroovyScriptContainer {
private static JsonObject updateRunConfigJson(ModContainer container, JsonObject json) {
json.addProperty("packName", container.getName());
json.addProperty("packId", container.getModId());
json.addProperty("version", container.getVersion());
return json;
}
/**
* {@link GroovySandbox#getClassFiles()}
* {@link GroovySandbox#getScriptFiles()}
* {@link GroovyScript#getResourcesFile()}
*
* hard to generate a running time {@link File}
* all logic writed with {@link File}
* **/

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package mods.Hileb.rml.compat.groovyscript;

import com.cleanroommc.groovyscript.sandbox.GroovyScriptSandbox;

/**
* @Project ResourceModLoader
* @Author Hileb
* @Date 2024/3/3 11:45
**/
public class RMLGroovySandbox extends GroovyScriptSandbox {
}

0 comments on commit d46bf07

Please sign in to comment.