diff --git a/build.gradle b/build.gradle index 0e6a2e5..bbaa72d 100644 --- a/build.gradle +++ b/build.gradle @@ -36,6 +36,8 @@ minecraft { accessTransformer = file('src/main/resources/META-INF/rml_at.cfg') + + runs { client { workingDirectory project.file('run') diff --git a/rmdk/build.gradle b/rmdk/build.gradle index 46ebaed..416680e 100644 --- a/rmdk/build.gradle +++ b/rmdk/build.gradle @@ -211,12 +211,12 @@ tasks.register("installRML", Copy){ to "runServer/mods" } tasks.register('buildServerRM', Zip) { - archiveName = "developing_resource_mod.zip" + archiveNameBase = "developing_resource_mod.zip" destinationDir = file("runServer/mods") from "dev" } tasks.register('buildClientRM', Zip) { - archiveName = "developing_resource_mod.zip" + archiveNameBase = "developing_resource_mod.zip" destinationDir = file("run/mods") from "dev" } diff --git a/rmdk/gradle/rml/ResourceModLoader-1.0.7.jar b/rmdk/gradle/rml/ResourceModLoader-1.0.7.jar deleted file mode 100644 index b9574b1..0000000 Binary files a/rmdk/gradle/rml/ResourceModLoader-1.0.7.jar and /dev/null differ diff --git a/rmdk/gradle/rml/ResourceModLoader-1.0.9.jar b/rmdk/gradle/rml/ResourceModLoader-1.0.9.jar new file mode 100644 index 0000000..7fcf1f9 Binary files /dev/null and b/rmdk/gradle/rml/ResourceModLoader-1.0.9.jar differ diff --git a/src/main/java/mods/Hileb/rml/compat/crt/CrTFindingIScriptIteratorEvent.java b/src/main/java/mods/Hileb/rml/compat/crt/CrTFindingIScriptIteratorEvent.java index aca230b..e7c25c1 100644 --- a/src/main/java/mods/Hileb/rml/compat/crt/CrTFindingIScriptIteratorEvent.java +++ b/src/main/java/mods/Hileb/rml/compat/crt/CrTFindingIScriptIteratorEvent.java @@ -20,7 +20,7 @@ public class CrTFindingIScriptIteratorEvent extends Event { scriptIterators=list; } @PublicAPI public void load(IScriptProvider provider){ - Iterator iterator=provider.getScripts(); + Iterator iterator = provider.getScripts(); while (iterator.hasNext()){ scriptIterators.add(iterator.next()); } diff --git a/src/main/java/mods/Hileb/rml/compat/crt/EventScriptProvider.java b/src/main/java/mods/Hileb/rml/compat/crt/EventScriptProvider.java index cfefff9..f0488cc 100644 --- a/src/main/java/mods/Hileb/rml/compat/crt/EventScriptProvider.java +++ b/src/main/java/mods/Hileb/rml/compat/crt/EventScriptProvider.java @@ -27,9 +27,9 @@ public Iterator getScripts() { return this.combine().iterator(); } @PrivateAPI public List combine(){ - LinkedList list=new LinkedList<>(); + LinkedList list = new LinkedList<>(); - Iterator iterator=proxy.getScripts(); + Iterator iterator = proxy.getScripts(); while (iterator.hasNext()){ list.add(iterator.next()); } diff --git a/src/main/java/mods/Hileb/rml/compat/crt/RMLCrTLoader.java b/src/main/java/mods/Hileb/rml/compat/crt/RMLCrTLoader.java index 480c2f3..e862e7f 100644 --- a/src/main/java/mods/Hileb/rml/compat/crt/RMLCrTLoader.java +++ b/src/main/java/mods/Hileb/rml/compat/crt/RMLCrTLoader.java @@ -72,7 +72,7 @@ public class RMLCrTLoader { byte[] fileBytes=FileHelper.getByteSource(file).read(); providerCustom.add(name,fileBytes); - RMLFMLLoadingPlugin.Container.LOGGER.debug(key.toString()); + RMLFMLLoadingPlugin.Container.LOGGER.info("Injected {} for CrT",key); } catch (IOException e) { throw new RuntimeException(e); } diff --git a/src/main/java/mods/Hileb/rml/core/RMLModDiscover.java b/src/main/java/mods/Hileb/rml/core/RMLModDiscover.java index 9910444..150d09f 100644 --- a/src/main/java/mods/Hileb/rml/core/RMLModDiscover.java +++ b/src/main/java/mods/Hileb/rml/core/RMLModDiscover.java @@ -28,6 +28,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Objects; import java.util.zip.ZipEntry; @@ -103,8 +104,13 @@ public static void inject(List modContainers){ throw new RuntimeException("illegal modules opinion for "+jsonObject.get("modid").getAsString(), e); } jsonObject.remove("modules"); + ModMetadata metadata = GSON.fromJson(jsonObject, ModMetadata.class); + return new ContainerHolder(new RMLModContainer(metadata, modFile), modules.toArray(new ContainerHolder.Modules[0])); + + }else { + ModMetadata metadata = GSON.fromJson(jsonObject, ModMetadata.class); + return new ContainerHolder(new RMLModContainer(metadata, modFile), ContainerHolder.Modules.values()); } - ModMetadata metadata = GSON.fromJson(jsonObject, ModMetadata.class); - return new ContainerHolder(new RMLModContainer(metadata, modFile), modules.toArray(new ContainerHolder.Modules[0])); + } }