Skip to content

Commit

Permalink
make all modules for default
Browse files Browse the repository at this point in the history
  • Loading branch information
Ecdcaeb committed Mar 10, 2024
1 parent 729ba10 commit a6bf7cb
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 8 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ minecraft {
accessTransformer = file('src/main/resources/META-INF/rml_at.cfg')




runs {
client {
workingDirectory project.file('run')
Expand Down
4 changes: 2 additions & 2 deletions rmdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
Binary file removed rmdk/gradle/rml/ResourceModLoader-1.0.7.jar
Binary file not shown.
Binary file added rmdk/gradle/rml/ResourceModLoader-1.0.9.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class CrTFindingIScriptIteratorEvent extends Event {
scriptIterators=list;
}
@PublicAPI public void load(IScriptProvider provider){
Iterator<IScriptIterator> iterator=provider.getScripts();
Iterator<IScriptIterator> iterator = provider.getScripts();
while (iterator.hasNext()){
scriptIterators.add(iterator.next());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public Iterator<IScriptIterator> getScripts() {
return this.combine().iterator();
}
@PrivateAPI public List<IScriptIterator> combine(){
LinkedList<IScriptIterator> list=new LinkedList<>();
LinkedList<IScriptIterator> list = new LinkedList<>();

Iterator<IScriptIterator> iterator=proxy.getScripts();
Iterator<IScriptIterator> iterator = proxy.getScripts();
while (iterator.hasNext()){
list.add(iterator.next());
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/mods/Hileb/rml/compat/crt/RMLCrTLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/mods/Hileb/rml/core/RMLModDiscover.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -103,8 +104,13 @@ public static void inject(List<ModContainer> 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]));

}
}

0 comments on commit a6bf7cb

Please sign in to comment.