diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java index b880d880..c671b706 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java @@ -20,6 +20,7 @@ public class InstallAuthlib { modifierMap.put("META-INF/libraries.list", new LibrariesLstModifier()); modifierMap.put("patch.properties", new PatchPropertiesModifier()); modifierMap.put("META-INF/download-context", new DownloadContextModifier()); + modifierMap.put("META-INF/patches.list", new PatchesLstModifier()); } public void run(String... args) throws Exception { boolean deleteAuthlibAfterInstall = false; diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/PatchesLstModifier.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/PatchesLstModifier.java new file mode 100644 index 00000000..51eaa516 --- /dev/null +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/PatchesLstModifier.java @@ -0,0 +1,29 @@ +package pro.gravit.launcher.server.authlib; + +import pro.gravit.utils.helper.LogHelper; +import pro.gravit.utils.helper.SecurityHelper; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; + +public class PatchesLstModifier implements LibrariesHashFileModifier { + @Override + public byte[] apply(byte[] data, InstallAuthlib.InstallAuthlibContext context) throws IOException { + String[] lines = new String(data).split("\n"); + for(int i=0;i