diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 480cf51..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,17 +0,0 @@ -variables: - MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository" - MAVEN_CLI_OPTS: "--errors --fail-at-end --show-version" - -image: maven:3-openjdk-8 - -cache: - paths: - - .m2/repository - -stages: - - build - -build: - stage: build - script: - - 'mvn $MAVEN_CLI_OPTS verify' diff --git a/Roadmap.md b/Roadmap.md deleted file mode 100644 index 03c3e36..0000000 --- a/Roadmap.md +++ /dev/null @@ -1,32 +0,0 @@ -# Roadmap - -## Features implemented - -- Entity data - - Entity id, sizes, health, modifiers - - Identifier, Inherits - - Meta data -- Items -- Dimensions -- Blocks -- Biomes -- Particles -- Statistics -- General version information - - Version name - - Protocol version - - Data version -- Block entities -- Sounds - - Categories - - Sounds - -## More features (I could implement) - -- Entity data - - Models - - Entity animations -- Recipes -- Packets -- Block actions -- Achievements diff --git a/logo.png b/logo.png deleted file mode 100644 index 132c9d1..0000000 Binary files a/logo.png and /dev/null differ diff --git a/wrapper/PixLyzer.py b/wrapper/PixLyzer.py deleted file mode 100644 index 54ab72b..0000000 --- a/wrapper/PixLyzer.py +++ /dev/null @@ -1,137 +0,0 @@ -import os -import subprocess -import urllib.request -import zipfile -from pathlib import Path - -import ujson - -DOWNLOAD_UNTIL_VERSION = "1.14.4-pre7" -SKIP_VERSIONS = ["19w35a", "19w34a"] -HASH_FOLDER = os.path.abspath("data/hash/") + "/" -ASSETS_HASH_INDEX_FILE = os.path.abspath("data/index") -OUT_FOLDER = os.path.abspath("data/version/") + "/" -LOGS_FOLDER = os.path.abspath("data/logs/") + "/" -DATA_FOLDER = os.path.abspath("data/data/") + "/" - -MC_REMAPPER_EXECUTABLE = "/home/moritz/Games/Minecraft/MC-Remapper/build/install/MC-Remapper/bin/MC-Remapper" -JAVA_PATH = "/usr/lib/jvm/java-8-openjdk-amd64/bin/java" -ADDITIONAL_CLASSPATH = "/home/moritz/kotlin-stdlib-1.4.30.jar" - -VERSION_MANIFEST = ujson.loads(urllib.request.urlopen('https://launchermeta.mojang.com/mc/game/version_manifest.json').read().decode("utf-8")) - -failedVersionIds = [] -partlyFailedVersionIds = [] - -print("Starting PixLyzer generator") - - -def runAndWait(command): - process = subprocess.Popen(command, cwd=r'../', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - print(process.stdout.read().decode('utf-8')) - print(process.stderr.read().decode('utf-8')) - return process.wait() - - -def getVersionJson(version): - # check cache - global DATA_FOLDER - path = DATA_FOLDER + version["id"] + "/" + version["id"] + ".json" - if not os.path.isfile(path): - # download - print("Debug: Downloading %s.json" % version["id"]) - Path(path).parent.mkdir(parents=True, exist_ok=True) - urllib.request.urlretrieve(version["url"], path) - - return ujson.load(open(path)) - - -def checkDeobfuscatedJar(jarBasePath, jarType, version, versionJson): - jarPath = jarBasePath + jarType + ".jar" - - if not os.path.isfile(jarPath): - mojangJarPath = jarBasePath + jarType + "_mojang.jar" - if not os.path.isfile(mojangJarPath): - print("Downloading mojang %s jar for %s" % (jarType, version["id"])) - urllib.request.urlretrieve(versionJson["downloads"][jarType]["url"], mojangJarPath) - - mojangMappingsPath = jarBasePath + jarType + "_mappings.txt" - if not os.path.isfile(mojangMappingsPath): - print("Downloading mojang %s mappings for %s" % (jarType, version["id"])) - urllib.request.urlretrieve(versionJson["downloads"][jarType + "_mappings"]["url"], mojangMappingsPath) - - # deobfuscate - print("Deobfuscating %s jar for %s" % (jarType, version["id"])) - global MC_REMAPPER_EXECUTABLE - - deobfuscateProcess = subprocess.Popen('%s \"%s\" \"%s\" --output-name \"%s\"' % (MC_REMAPPER_EXECUTABLE, mojangJarPath, mojangMappingsPath, jarPath), cwd=r'.', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - exitCode = deobfuscateProcess.wait() - if exitCode != 0: - print("Could not deobfuscate %s jar for %s" % (jarType, version["id"])) - print() - print(deobfuscateProcess.stdout.read().decode('utf-8')) - print(deobfuscateProcess.stderr.read().decode('utf-8')) - exit(5) - else: - # delete mojang jars - print("Deleting META-INF folder") - zipIn = zipfile.ZipFile(jarPath, 'r') - zipOut = zipfile.ZipFile(jarPath + ".tmp", 'w') - for item in zipIn.infolist(): - buffer = zipIn.read(item.filename) - if not item.filename.startswith("META-INF"): - zipOut.writestr(item, buffer) - - zipOut.close() - zipIn.close() - - os.remove(jarPath) - os.rename(jarPath + ".tmp", jarPath) - - print("Deleting %s jar and mappings for %s" % (jarType, version["id"])) - os.remove(mojangJarPath) - os.remove(mojangMappingsPath) - - -def checkDeobfuscatedJars(version, versionJson): - global DATA_FOLDER - jarBasePath = DATA_FOLDER + version["id"] + "/" + version["id"] + "_" - checkDeobfuscatedJar(jarBasePath, "client", version, versionJson) - checkDeobfuscatedJar(jarBasePath, "server", version, versionJson) - - -def replaceInFile(file, search, replace): - with open(file, "rt") as fin: - with open(file, "wt") as fout: - for line in fin: - fout.write(line.replace(search, replace)) - - -for version in VERSION_MANIFEST["versions"]: - if version["id"] in SKIP_VERSIONS: - print("Skipping %s" % version["id"]) - continue - - if version["id"] == DOWNLOAD_UNTIL_VERSION: - print("Breaking at %s" % version["id"]) - break - - versionJson = getVersionJson(version) - - checkDeobfuscatedJars(version, versionJson) - - if version["id"] != "1.15.2": - continue - - # checkout correct branch, add jars to maven, build and run in maven - runAndWait('git checkout version-%s' % version["id"].replace(" ", "-")) - - # build - runAndWait('mvn clean verify') - - # execute - startCommand = "%s -classpath \"%s:%s:%s\" de.bixilon.pixlyzer.PixLyzer" % (JAVA_PATH, DATA_FOLDER + version["id"] + "/" + version["id"] + "_client.jar", DATA_FOLDER + version["id"] + "/" + version["id"] + "_server.jar", "target/classes") - print(startCommand) - runAndWait("%s -classpath \"%s:%s:%s:%s\" de.bixilon.pixlyzer.PixLyzer %s %s %s" % (JAVA_PATH, ADDITIONAL_CLASSPATH, DATA_FOLDER + version["id"] + "/" + version["id"] + "_client.jar", DATA_FOLDER + version["id"] + "/" + version["id"] + "_server.jar", "target/classes", OUT_FOLDER + version["id"], HASH_FOLDER, ASSETS_HASH_INDEX_FILE)) - -print("Done with downloading and generating all data")