From 0d2448583faddb6bcfb63ffa9278a61877b26513 Mon Sep 17 00:00:00 2001 From: Bixilon Date: Mon, 16 May 2022 17:10:32 +0200 Subject: [PATCH] fix crash with different mbt-kotlin version --- pom.xml | 4 ++-- src/main/kotlin/de/bixilon/pixlyzer/PixLyzer.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index cca138d..51aeca8 100644 --- a/pom.xml +++ b/pom.xml @@ -80,9 +80,9 @@ ${project.basedir}/wrapper/data/data/${minecraft.version}_yarn/${minecraft.version}-exhibitionism.jar - com.gitlab.Bixilon + de.bixilon mbf-kotlin - cc331b8c + 0.2.1 org.objenesis diff --git a/src/main/kotlin/de/bixilon/pixlyzer/PixLyzer.kt b/src/main/kotlin/de/bixilon/pixlyzer/PixLyzer.kt index 9544824..83d2215 100644 --- a/src/main/kotlin/de/bixilon/pixlyzer/PixLyzer.kt +++ b/src/main/kotlin/de/bixilon/pixlyzer/PixLyzer.kt @@ -128,7 +128,7 @@ object PixLyzer { if (File(mbfAssetsIndex.absolutePath + ".json").exists()) { val mbfStream = ByteArrayOutputStream() - MBFBinaryWriter(mbfStream).writeMBF(MBFData(dataInfo = MBFDataInfo(compression = MBFCompressionTypes.ZSDT, preferVariableTypes = true, variableLengthPrefix = true, compressionLevel = 22), data = all)) + MBFBinaryWriter(mbfStream).writeMBF(MBFData(dataInfo = MBFDataInfo(compression = MBFCompressionTypes.ZSTD, preferVariableTypes = true, variableLengthPrefix = true, compressionLevel = 22), data = all)) val mbfHash = Util.saveHashFile(ByteArrayInputStream(mbfStream.toByteArray()), tempFileOutputPath, FileOutputStream(tempFileOutputPath), hashDirectory.absolutePath + "/\${shortHash}/\${hash}.mbf") @@ -164,7 +164,7 @@ object PixLyzer { } ByteArrayOutputStream().let { - MBFBinaryWriter(it).writeMBF(MBFData(dataInfo = MBFDataInfo(compression = MBFCompressionTypes.ZSDT, preferVariableTypes = true, variableLengthPrefix = true, compressionLevel = 22), data = data)) + MBFBinaryWriter(it).writeMBF(MBFData(dataInfo = MBFDataInfo(compression = MBFCompressionTypes.ZSTD, preferVariableTypes = true, variableLengthPrefix = true, compressionLevel = 22), data = data)) val fileWriter = FileOutputStream("$path.mbf") fileWriter.write(it.toByteArray()) fileWriter.close()