mirror of
https://gitlab.bixilon.de/bixilon/pixlyzer.git
synced 2025-09-27 14:10:01 -04:00
fix some bugs
This commit is contained in:
parent
3cf0604b9b
commit
6c37e8ed42
18
ReadMe.md
18
ReadMe.md
@ -57,10 +57,18 @@ I'd be happy. Just make a PR and ensure, it is working for most versions (And pl
|
|||||||
- Models
|
- Models
|
||||||
- Statistics
|
- Statistics
|
||||||
- General version information
|
- General version information
|
||||||
- Version name
|
- Version name
|
||||||
- Protocol version
|
- Protocol version
|
||||||
- Data version
|
- Data version
|
||||||
- Block entities
|
- Block entities
|
||||||
- Sounds
|
- Sounds
|
||||||
- Categories
|
- Categories
|
||||||
- Sounds
|
- Sounds
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
- Maven
|
||||||
|
- [MC-Remapper](https://github.com/HeartPattern/MC-Remapper)
|
||||||
|
- [objenesis](https://github.com/easymock/objenesis)
|
||||||
|
- Kotlin
|
||||||
|
- [ujson](https://pypi.org/project/ujson/)
|
||||||
|
@ -20,6 +20,8 @@ ADDITIONAL_CLASSPATH = "/home/moritz/kotlin-stdlib-1.4.30.jar:/home/moritz/Games
|
|||||||
|
|
||||||
VERSION_MANIFEST_URL = "https://launchermeta.mojang.com/mc/game/version_manifest.json"
|
VERSION_MANIFEST_URL = "https://launchermeta.mojang.com/mc/game/version_manifest.json"
|
||||||
|
|
||||||
|
COMPILE_VERSION = "21w08a"
|
||||||
|
|
||||||
failedVersionIds = []
|
failedVersionIds = []
|
||||||
partlyFailedVersionIds = []
|
partlyFailedVersionIds = []
|
||||||
|
|
||||||
@ -30,9 +32,9 @@ VERSION_MANIFEST = ujson.loads(urllib.request.urlopen(VERSION_MANIFEST_URL).read
|
|||||||
|
|
||||||
def searchVersion(versionId):
|
def searchVersion(versionId):
|
||||||
global VERSION_MANIFEST
|
global VERSION_MANIFEST
|
||||||
for version in VERSION_MANIFEST["versions"]:
|
for versionEntry in VERSION_MANIFEST["versions"]:
|
||||||
if version["id"] == versionId:
|
if versionEntry["id"] == versionId:
|
||||||
return version
|
return versionEntry
|
||||||
raise Exception("Unknown version: %s" % versionId)
|
raise Exception("Unknown version: %s" % versionId)
|
||||||
|
|
||||||
|
|
||||||
@ -52,15 +54,16 @@ def runAndWait(command):
|
|||||||
return exitCode
|
return exitCode
|
||||||
|
|
||||||
|
|
||||||
def getVersionJson(version):
|
def getVersionJson(versionEntry):
|
||||||
# check cache
|
# check cache
|
||||||
global DATA_FOLDER
|
global DATA_FOLDER
|
||||||
path = DATA_FOLDER + version["id"] + "/" + version["id"] + ".json"
|
versionId = versionEntry["id"]
|
||||||
|
path = DATA_FOLDER + versionId + "/" + versionId + ".json"
|
||||||
if not os.path.isfile(path):
|
if not os.path.isfile(path):
|
||||||
# download
|
# download
|
||||||
print("Debug: Downloading %s.json" % version["id"])
|
print("Debug: Downloading %s.json" % versionEntry["id"])
|
||||||
Path(path).parent.mkdir(parents=True, exist_ok=True)
|
Path(path).parent.mkdir(parents=True, exist_ok=True)
|
||||||
urllib.request.urlretrieve(version["url"], path)
|
urllib.request.urlretrieve(versionEntry["url"], path)
|
||||||
|
|
||||||
return ujson.load(open(path))
|
return ujson.load(open(path))
|
||||||
|
|
||||||
@ -129,9 +132,16 @@ def replaceInFile(file, search, replace):
|
|||||||
|
|
||||||
|
|
||||||
def compilePixLyzer():
|
def compilePixLyzer():
|
||||||
print("Compiling pixlyzer...")
|
print("Compiling PixLyzer...")
|
||||||
|
compileVersion = {}
|
||||||
|
# TODO WTF
|
||||||
|
searched = searchVersion(COMPILE_VERSION)
|
||||||
|
for versionEntry in searched:
|
||||||
|
compileVersion[versionEntry] = searched[versionEntry]
|
||||||
|
|
||||||
|
checkDeobfuscatedJars(compileVersion, getVersionJson(compileVersion))
|
||||||
if runAndWait('mvn clean verify') != 0:
|
if runAndWait('mvn clean verify') != 0:
|
||||||
raise Exception("Can not compile for %s" % version["id"])
|
raise Exception("Can not compile PixLyzer")
|
||||||
print("PixLyzer is now compiled")
|
print("PixLyzer is now compiled")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user