mirror of
https://gitlab.bixilon.de/bixilon/pixlyzer.git
synced 2025-09-27 14:10:01 -04:00
pix some loading bugs
This commit is contained in:
parent
6a0b10100a
commit
5fa43d52b1
2
pom.xml
2
pom.xml
@ -17,7 +17,7 @@
|
|||||||
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
|
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
<minecraft.version>1.15-pre3</minecraft.version>
|
<minecraft.version>21w14a</minecraft.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -4,10 +4,9 @@ import com.google.gson.GsonBuilder
|
|||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import de.bixilon.pixlyzer.generator.Generators
|
import de.bixilon.pixlyzer.generator.Generators
|
||||||
import de.bixilon.pixlyzer.util.ReflectionUtil.getClass
|
import de.bixilon.pixlyzer.util.ReflectionUtil.getClass
|
||||||
|
import de.bixilon.pixlyzer.util.ReflectionUtil.getGetter
|
||||||
import de.bixilon.pixlyzer.util.Util
|
import de.bixilon.pixlyzer.util.Util
|
||||||
import net.minecraft.Bootstrap
|
import net.minecraft.Bootstrap
|
||||||
import net.minecraft.MinecraftVersion
|
|
||||||
import net.minecraft.SharedConstants
|
|
||||||
import net.minecraft.util.registry.Registry
|
import net.minecraft.util.registry.Registry
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.FileInputStream
|
import java.io.FileInputStream
|
||||||
@ -36,8 +35,8 @@ object PixLyzer {
|
|||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
println("Starting PixLyzer")
|
println("Starting PixLyzer")
|
||||||
|
|
||||||
if (args.size != 3) {
|
if (args.size != 4) {
|
||||||
error("Usage: java -cp minecraft,pixlyzer de.bixilon.pixlyzer.PixLyzer <Output directory> <Hash directory> <Assets index>")
|
error("Usage: java -cp minecraft,pixlyzer de.bixilon.pixlyzer.PixLyzer <Output directory> <Hash directory> <Assets index> <Version id>")
|
||||||
}
|
}
|
||||||
|
|
||||||
val outputDirectory = File(args[0])
|
val outputDirectory = File(args[0])
|
||||||
@ -45,6 +44,7 @@ object PixLyzer {
|
|||||||
val hashDirectory = File(args[1])
|
val hashDirectory = File(args[1])
|
||||||
hashDirectory.mkdirs()
|
hashDirectory.mkdirs()
|
||||||
val assetsIndex = File(args[2])
|
val assetsIndex = File(args[2])
|
||||||
|
val versionId = args[3]
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -145,8 +145,6 @@ object PixLyzer {
|
|||||||
|
|
||||||
val assetsIndexJson = Util.readJsonFile(assetsIndex.absolutePath + ".json")
|
val assetsIndexJson = Util.readJsonFile(assetsIndex.absolutePath + ".json")
|
||||||
|
|
||||||
val versionId = MinecraftVersion.create().name // ToDo: Should be id, but in 1.14 there is a hash in the id???
|
|
||||||
|
|
||||||
assetsIndexJson.addProperty(versionId, hash)
|
assetsIndexJson.addProperty(versionId, hash)
|
||||||
|
|
||||||
writeJson(assetsIndex.absolutePath, assetsIndexJson)
|
writeJson(assetsIndex.absolutePath, assetsIndexJson)
|
||||||
@ -166,9 +164,5 @@ object PixLyzer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val initializeGameVersionMethod = try {
|
private val initializeGameVersionMethod = getGetter(getClass("net.minecraft.SharedConstants"), "method_36208")
|
||||||
getClass(SharedConstants::class.java.simpleName)?.getDeclaredMethod("method_36208")
|
|
||||||
} catch (exception: Exception) {
|
|
||||||
null
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ for version in VERSION_MANIFEST["versions"]:
|
|||||||
versionStartTime = datetime.now()
|
versionStartTime = datetime.now()
|
||||||
print("Generating data for %s" % version["id"])
|
print("Generating data for %s" % version["id"])
|
||||||
# execute
|
# execute
|
||||||
if runAndWait("%s -Xverify:none -classpath \"%s:%s:%s:%s\" de.bixilon.pixlyzer.PixLyzer \"%s\" \"%s\" \"%s\"" % (JAVA_PATH, ADDITIONAL_CLASSPATH, DATA_FOLDER + version["id"] + "_yarn/" + version["id"] + "-named.jar", DATA_FOLDER + version["id"] + "_yarn/" + version["id"] + "_server_mojang.jar", "target/classes", OUT_FOLDER + version["id"], HASH_FOLDER, ASSETS_HASH_INDEX_FILE)) != 0:
|
if runAndWait("%s -Xverify:none -classpath \"%s:%s:%s:%s\" de.bixilon.pixlyzer.PixLyzer \"%s\" \"%s\" \"%s\" \"%s\"" % (JAVA_PATH, ADDITIONAL_CLASSPATH, DATA_FOLDER + version["id"] + "_yarn/" + version["id"] + "-named.jar", DATA_FOLDER + version["id"] + "_yarn/" + version["id"] + "_server_mojang.jar", "target/classes", OUT_FOLDER + version["id"], HASH_FOLDER, ASSETS_HASH_INDEX_FILE, version["id"])) != 0:
|
||||||
print("PixLyzer did not run successfully for %s" % version["id"])
|
print("PixLyzer did not run successfully for %s" % version["id"])
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user