From fbf673d1c80fcf375de001b47ec4ac7a33f7cc04 Mon Sep 17 00:00:00 2001 From: Luke Schwager Date: Fri, 18 Aug 2023 13:01:23 -0700 Subject: [PATCH] legacy-fixes 1.0.1 and reformat some files --- .gitignore | 3 +- .gitmodules | 3 + generate.py | 11 +- generate.sh | 7 + legacy-fixes | 1 + skel/patches/net.fabricmc.intermediary.json | 20 +- skel/patches/org.lwjgl.lwjgl.json | 204 ++++++++++---------- 7 files changed, 129 insertions(+), 120 deletions(-) create mode 100644 .gitmodules create mode 100755 generate.sh create mode 160000 legacy-fixes diff --git a/.gitignore b/.gitignore index 0f3707d..8d13e39 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ out/* -.idea/ \ No newline at end of file +.idea/ +*.jar \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..dd43ec0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "legacy-fixes"] + path = legacy-fixes + url = https://github.com/Legacy-Fabric/legacy-fixes diff --git a/generate.py b/generate.py index 5fb2fd8..ac0f5a5 100755 --- a/generate.py +++ b/generate.py @@ -2,7 +2,7 @@ import os import zipfile -loader: str = "0.14.21" +loader: str = "0.14.22" legacy_fixes: str = "legacy-fixes-1.0.1.jar" lwjgl3: str = "3.1.6" lwjgl2: str = "2.9.4-nightly-20150209" @@ -15,7 +15,8 @@ def mkdir_if_not_exists(path: str): class Generator: - def __init__(self, loader_version: str, minecraft_version: str, lwjgl_version: str, lwjgl_patch: str, path: str = "temp"): + def __init__(self, loader_version: str, minecraft_version: str, lwjgl_version: str, lwjgl_patch: str, + path: str = "temp"): self.lwjgl_version: str = lwjgl_version self.minecraft_version: str = minecraft_version self.loader_version: str = loader_version @@ -83,7 +84,7 @@ def create_zip(self): if not self.lwjgl_version.startswith("3"): z.write("temp/patches/org.lwjgl.lwjgl.json", - "patches/org.lwjgl.json") + "patches/org.lwjgl.json") if self.minecraft_version == "1.8.9" or self.minecraft_version == "1.7.10" or self.minecraft_version == "1.6.4" or self.minecraft_version == "1.5.2" or self.minecraft_version == "1.4.7" or self.minecraft_version == "1.3.2": z.write(f"temp/.minecraft/mods/{legacy_fixes}", f".minecraft/mods/{legacy_fixes}") @@ -123,7 +124,3 @@ def cleanup(self): g = Generator(loader, version, lwjgl_version, lwjgl_patch) g.prepare_skeleton() g.create_zip() - -# g = Generator(loader, "1.13.2", lwjgl3) -# g.prepare_skeleton() -# g.create_zip() diff --git a/generate.sh b/generate.sh new file mode 100755 index 0000000..70d0ffd --- /dev/null +++ b/generate.sh @@ -0,0 +1,7 @@ +#!/bin/sh +cd legacy-fixes/ +./gradlew clean build +cd .. +cp legacy-fixes/build/libs/*.jar . +./generate.py + diff --git a/legacy-fixes b/legacy-fixes new file mode 160000 index 0000000..3b7095e --- /dev/null +++ b/legacy-fixes @@ -0,0 +1 @@ +Subproject commit 3b7095e05a949fd52f99586663a64911c86afd1a diff --git a/skel/patches/net.fabricmc.intermediary.json b/skel/patches/net.fabricmc.intermediary.json index 5e896e2..18a5980 100644 --- a/skel/patches/net.fabricmc.intermediary.json +++ b/skel/patches/net.fabricmc.intermediary.json @@ -1,12 +1,12 @@ { - "formatVersion": 1, - "+libraries": [ - { - "name": "net.legacyfabric:intermediary:${minecraft_version}", - "url": "https://maven.legacyfabric.net/" - } - ], - "name": "Intermediary Mappings", - "uid": "net.fabricmc.intermediary", - "version": "${minecraft_version}" + "formatVersion": 1, + "+libraries": [ + { + "name": "net.legacyfabric:intermediary:${minecraft_version}", + "url": "https://maven.legacyfabric.net/" + } + ], + "name": "Intermediary Mappings", + "uid": "net.fabricmc.intermediary", + "version": "${minecraft_version}" } diff --git a/skel/patches/org.lwjgl.lwjgl.json b/skel/patches/org.lwjgl.lwjgl.json index 5869150..bc2539a 100644 --- a/skel/patches/org.lwjgl.lwjgl.json +++ b/skel/patches/org.lwjgl.lwjgl.json @@ -1,105 +1,105 @@ { - "formatVersion": 1, - "libraries": [ - { - "downloads": { - "classifiers": { - "natives-linux": { - "sha1": "7ff832a6eb9ab6a767f1ade2b548092d0fa64795", - "size": 10362, - "url": "https://libraries.minecraft.net/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-linux.jar" - }, - "natives-linux-arm32": { - "sha1": "f3c455b71c5146acb5f8a9513247fc06db182fd5", - "size": 4521, - "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-2.9.4/jinput-platform-2.0.5-natives-linux.jar" - }, - "natives-linux-arm64": { - "sha1": "42b388ccb7c63cec4e9f24f4dddef33325f8b212", - "size": 10932, - "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-2.9.4/jinput-platform-2.0.5-natives-linux.jar" - }, - "natives-osx": { - "sha1": "53f9c919f34d2ca9de8c51fc4e1e8282029a9232", - "size": 12186, - "url": "https://libraries.minecraft.net/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-osx.jar" - }, - "natives-osx-arm64": { - "sha1": "5189eb40db3087fb11ca063b68fa4f4c20b199dd", - "size": 10031, - "url": "https://github.com/r58Playz/jinput-m1/raw/main/plugins/OSX/bin/jinput-platform-2.0.5.jar" - }, - "natives-windows": { - "sha1": "385ee093e01f587f30ee1c8a2ee7d408fd732e16", - "size": 155179, - "url": "https://libraries.minecraft.net/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-windows.jar" - } - } - }, - "extract": { - "exclude": [ - "META-INF/" - ] - }, - "name": "net.java.jinput:jinput-platform:2.0.5", - "natives": { - "linux": "natives-linux", - "linux-arm32": "natives-linux-arm32", - "linux-arm64": "natives-linux-arm64", - "osx": "natives-osx", - "osx-arm64": "natives-osx-arm64", - "windows": "natives-windows" - } - }, - { - "downloads": { - "artifact": { - "sha1": "39c7796b469a600f72380316f6b1f11db6c2c7c4", - "size": 208338, - "url": "https://libraries.minecraft.net/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar" - } - }, - "name": "net.java.jinput:jinput:2.0.5" - }, - { - "downloads": { - "artifact": { - "sha1": "e12fe1fda814bd348c1579329c86943d2cd3c6a6", - "size": 7508, - "url": "https://libraries.minecraft.net/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar" - } - }, - "name": "net.java.jutils:jutils:1.0.0" - }, - { - "extract": { - "exclude": [ - "META-INF/" - ] - }, - "name": "org.lwjgl.lwjgl:lwjgl-platform:${lwjgl_patch}", - "url": "https://maven.legacyfabric.net/", - "natives": { - "linux": "natives-linux", - "linux-arm32": "natives-linux", - "linux-arm64": "natives-linux", - "osx": "natives-osx", - "osx-arm64": "natives-osx", - "windows": "natives-windows" - } - }, - { - "name": "org.lwjgl.lwjgl:lwjgl:${lwjgl_patch}", - "url": "https://maven.legacyfabric.net/" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl_util:${lwjgl_patch}", - "url": "https://maven.legacyfabric.net/" + "formatVersion": 1, + "libraries": [ + { + "downloads": { + "classifiers": { + "natives-linux": { + "sha1": "7ff832a6eb9ab6a767f1ade2b548092d0fa64795", + "size": 10362, + "url": "https://libraries.minecraft.net/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-linux.jar" + }, + "natives-linux-arm32": { + "sha1": "f3c455b71c5146acb5f8a9513247fc06db182fd5", + "size": 4521, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-2.9.4/jinput-platform-2.0.5-natives-linux.jar" + }, + "natives-linux-arm64": { + "sha1": "42b388ccb7c63cec4e9f24f4dddef33325f8b212", + "size": 10932, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-2.9.4/jinput-platform-2.0.5-natives-linux.jar" + }, + "natives-osx": { + "sha1": "53f9c919f34d2ca9de8c51fc4e1e8282029a9232", + "size": 12186, + "url": "https://libraries.minecraft.net/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-osx.jar" + }, + "natives-osx-arm64": { + "sha1": "5189eb40db3087fb11ca063b68fa4f4c20b199dd", + "size": 10031, + "url": "https://github.com/r58Playz/jinput-m1/raw/main/plugins/OSX/bin/jinput-platform-2.0.5.jar" + }, + "natives-windows": { + "sha1": "385ee093e01f587f30ee1c8a2ee7d408fd732e16", + "size": 155179, + "url": "https://libraries.minecraft.net/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-windows.jar" + } } - ], - "name": "LWJGL 2", - "type": "release", - "uid": "org.lwjgl", - "version": "${lwjgl_patch}", - "volatile": true + }, + "extract": { + "exclude": [ + "META-INF/" + ] + }, + "name": "net.java.jinput:jinput-platform:2.0.5", + "natives": { + "linux": "natives-linux", + "linux-arm32": "natives-linux-arm32", + "linux-arm64": "natives-linux-arm64", + "osx": "natives-osx", + "osx-arm64": "natives-osx-arm64", + "windows": "natives-windows" + } + }, + { + "downloads": { + "artifact": { + "sha1": "39c7796b469a600f72380316f6b1f11db6c2c7c4", + "size": 208338, + "url": "https://libraries.minecraft.net/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar" + } + }, + "name": "net.java.jinput:jinput:2.0.5" + }, + { + "downloads": { + "artifact": { + "sha1": "e12fe1fda814bd348c1579329c86943d2cd3c6a6", + "size": 7508, + "url": "https://libraries.minecraft.net/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar" + } + }, + "name": "net.java.jutils:jutils:1.0.0" + }, + { + "extract": { + "exclude": [ + "META-INF/" + ] + }, + "name": "org.lwjgl.lwjgl:lwjgl-platform:${lwjgl_patch}", + "url": "https://maven.legacyfabric.net/", + "natives": { + "linux": "natives-linux", + "linux-arm32": "natives-linux", + "linux-arm64": "natives-linux", + "osx": "natives-osx", + "osx-arm64": "natives-osx", + "windows": "natives-windows" + } + }, + { + "name": "org.lwjgl.lwjgl:lwjgl:${lwjgl_patch}", + "url": "https://maven.legacyfabric.net/" + }, + { + "name": "org.lwjgl.lwjgl:lwjgl_util:${lwjgl_patch}", + "url": "https://maven.legacyfabric.net/" + } + ], + "name": "LWJGL 2", + "type": "release", + "uid": "org.lwjgl", + "version": "${lwjgl_patch}", + "volatile": true } \ No newline at end of file