Merge pull request #28 from TheKodeToad/legacyservices-attempt2

This commit is contained in:
Sefa Eyeoglu 2023-10-15 22:38:51 +02:00 committed by GitHub
commit 3975c6bbd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 237 additions and 0 deletions

View File

@ -9,6 +9,7 @@ from typing import Optional, List
from meta.common import ensure_component_dir, launcher_path, upstream_path, static_path
from meta.common.mojang import (
STATIC_LEGACY_SERVICES_FILE,
VERSION_MANIFEST_FILE,
MINECRAFT_COMPONENT,
LWJGL3_COMPONENT,
@ -28,6 +29,7 @@ from meta.model import (
MojangRules,
)
from meta.model.mojang import (
LegacyServices,
MojangIndexWrap,
MojangIndex,
MojangVersion,
@ -311,6 +313,9 @@ def main():
override_index = LegacyOverrideIndex.parse_file(
os.path.join(STATIC_DIR, STATIC_OVERRIDES_FILE)
)
legacy_services = LegacyServices.parse_file(
os.path.join(STATIC_DIR, STATIC_LEGACY_SERVICES_FILE)
)
library_patches = LibraryPatches.parse_file(
os.path.join(STATIC_DIR, LIBRARY_PATCHES_FILE)
)
@ -486,6 +491,10 @@ def main():
if v.version in override_index.versions:
override = override_index.versions[v.version]
override.apply_onto_meta_version(v)
if v.version in legacy_services:
if v.additional_traits == None:
v.additional_traits = []
v.additional_traits.append("legacyServices");
v.write(out_filename)
for lwjglVersionVariant in lwjglVersionVariants:

View File

@ -9,6 +9,7 @@ ASSETS_DIR = join(BASE_DIR, "assets")
STATIC_EXPERIMENTS_FILE = join(BASE_DIR, "minecraft-experiments.json")
STATIC_OLD_SNAPSHOTS_FILE = join(BASE_DIR, "minecraft-old-snapshots.json")
STATIC_OVERRIDES_FILE = join(BASE_DIR, "minecraft-legacy-override.json")
STATIC_LEGACY_SERVICES_FILE = join(BASE_DIR, "minecraft-legacy-services.json")
LIBRARY_PATCHES_FILE = join(BASE_DIR, "library-patches.json")
MINECRAFT_COMPONENT = "net.minecraft"

View File

@ -165,6 +165,16 @@ class LibraryPatches(MetaBase):
return self.__root__[item]
class LegacyServices(MetaBase):
__root__: List[str]
def __iter__(self) -> Iterator[str]:
return iter(self.__root__)
def __getitem__(self, item) -> str:
return self.__root__[item]
class MojangArguments(MetaBase):
game: Optional[List[Any]] # mixture of strings and objects
jvm: Optional[List[Any]]

View File

@ -0,0 +1,217 @@
[
"c0.30_01c",
"inf-20100618",
"a1.0.4",
"a1.0.5_01",
"a1.0.11",
"a1.0.14",
"a1.0.15",
"a1.0.16",
"a1.0.17_02",
"a1.0.17_04",
"a1.1.0",
"a1.1.2",
"a1.1.2_01",
"a1.2.0",
"a1.2.0_01",
"a1.2.0_02",
"a1.2.1",
"a1.2.1_01",
"a1.2.2a",
"a1.2.2b",
"a1.2.3",
"a1.2.3_01",
"a1.2.3_02",
"a1.2.3_04",
"a1.2.4_01",
"a1.2.5",
"a1.2.6",
"b1.0",
"b1.0_01",
"b1.0.2",
"b1.1_01",
"b1.1_02",
"b1.2",
"b1.2_01",
"b1.2_02",
"b1.3b",
"b1.3_01",
"b1.4",
"b1.4_01",
"b1.5",
"b1.5_01",
"b1.6",
"b1.6.1",
"b1.6.2",
"b1.6.3",
"b1.6.4",
"b1.6.5",
"b1.6.6",
"b1.7",
"b1.7.2",
"b1.7.3",
"b1.8-pre1-2",
"b1.8-pre2",
"b1.8",
"b1.8.1",
"b1.9-pre1",
"b1.9-pre2",
"b1.9-pre3",
"b1.9-pre4",
"b1.9-pre5",
"b1.9-pre6",
"1.0",
"11w47a",
"11w48a",
"11w49a",
"11w50a",
"12w01a",
"1.1",
"12w03a",
"12w04a",
"12w05a",
"12w05b",
"12w06a",
"12w07b",
"12w07a",
"12w08a",
"1.2",
"1.2.1",
"1.2.2",
"1.2.3",
"1.2.4",
"1.2.5",
"12w16a",
"12w17a",
"12w18a",
"12w19a",
"12w21a",
"12w21b",
"12w22a",
"12w23a",
"12w23b",
"12w24a",
"12w25a",
"12w26a",
"12w27a",
"12w30a",
"12w30b",
"12w30c",
"12w30d",
"12w30e",
"1.3",
"1.3.1",
"12w32a",
"1.3.2",
"12w34a",
"12w34b",
"12w36a",
"12w37a",
"12w38a",
"12w38b",
"12w39a",
"12w39b",
"12w40a",
"12w40b",
"12w41a",
"12w41b",
"12w42a",
"12w42b",
"1.4",
"1.4.1",
"1.4.2",
"1.4.3",
"1.4.4",
"1.4.5",
"12w49a",
"12w50a",
"12w50b",
"1.4.6",
"1.4.7",
"13w01a",
"13w01b",
"13w02a",
"13w02b",
"13w03a",
"13w04a",
"13w05a",
"13w05b",
"13w06a",
"13w07a",
"13w11a",
"13w09a",
"13w09b",
"13w09c",
"13w10a",
"13w10b",
"1.5",
"13w12~",
"1.5.1",
"1.5.2",
"13w17a",
"13w18a",
"13w18b",
"13w18c",
"13w19a",
"13w21a",
"13w21b",
"13w22a",
"13w23a",
"13w23b",
"13w24a",
"13w24b",
"13w25a",
"13w25b",
"13w25c",
"13w26a",
"1.6",
"1.6.1",
"1.6.2",
"13w36a",
"13w36b",
"13w37a",
"1.6.3",
"13w37b",
"1.6.4",
"13w38a",
"13w38b",
"13w38c",
"13w39a",
"13w39b",
"13w41a",
"13w41b",
"13w42a",
"13w42b",
"13w43a",
"1.7",
"1.7.1",
"1.7.2",
"13w47a",
"13w47b",
"13w47c",
"13w47d",
"13w47e",
"13w48a",
"13w48b",
"13w49a",
"1.7.3",
"14w02a",
"14w02b",
"14w02c",
"14w03a",
"14w03b",
"14w04a",
"14w04b",
"14w05a",
"14w05b",
"14w06a",
"14w06b",
"14w07a",
"1.7.5",
"14w08a",
"14w10b",
"14w10c",
"1.7.6-pre1",
"1.7.6-pre2",
"14w11a"
]