diff options
| author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-06-26 12:16:33 +0200 |
|---|---|---|
| committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-06-26 12:16:54 +0200 |
| commit | 79ff11d653919b702dcdab20289c2580d19408fb (patch) | |
| tree | 2904aaa8bb5f914b29011e483b3347523f76a19b /meta | |
| parent | 75006147ddc166ed3f6f148940018475159bd326 (diff) | |
| download | Project-Tick-79ff11d653919b702dcdab20289c2580d19408fb.tar.gz Project-Tick-79ff11d653919b702dcdab20289c2580d19408fb.zip | |
feat: add LibraryPatches model
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/model/mojang.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/meta/model/mojang.py b/meta/model/mojang.py index d76ff41313..e99145cc5c 100644 --- a/meta/model/mojang.py +++ b/meta/model/mojang.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import Optional, List, Dict, Any +from typing import Optional, List, Dict, Any, Iterator from pydantic import validator, Field @@ -14,7 +14,6 @@ COMPATIBLE_JAVA_MAPPINGS = { 17: [18] } - ''' Mojang index files look like this: { @@ -111,6 +110,22 @@ class LegacyOverrideIndex(MetaBase): versions: Dict[str, LegacyOverrideEntry] +class LibraryPatch(MetaBase): + match: List[GradleSpecifier] + override: Optional[Library] + additionalLibraries: Optional[List[Library]] + + +class LibraryPatches(MetaBase): + __root__: List[LibraryPatch] + + def __iter__(self) -> Iterator[LibraryPatch]: + return iter(self.__root__) + + def __getitem__(self, item) -> LibraryPatch: + return self.__root__[item] + + class MojangArguments(MetaBase): game: Optional[List[Any]] # mixture of strings and objects jvm: Optional[List[Any]] |
