fix crash with different mbt-kotlin version

This commit is contained in:
Bixilon 2022-05-16 17:10:32 +02:00
parent f7d3ad8110
commit 0d2448583f
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 4 additions and 4 deletions

View File

@ -80,9 +80,9 @@
<systemPath>${project.basedir}/wrapper/data/data/${minecraft.version}_yarn/${minecraft.version}-exhibitionism.jar</systemPath>
</dependency>
<dependency>
<groupId>com.gitlab.Bixilon</groupId>
<groupId>de.bixilon</groupId>
<artifactId>mbf-kotlin</artifactId>
<version>cc331b8c</version>
<version>0.2.1</version>
</dependency>
<dependency>
<groupId>org.objenesis</groupId>

View File

@ -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()