network: 22w14a, assets: move to piston-data

This commit is contained in:
Bixilon 2022-06-15 20:52:04 +02:00
parent f017b1db9f
commit 396027fecf
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
6 changed files with 31 additions and 7 deletions

View File

@ -62,10 +62,12 @@ class JarAssetsManager(
} else {
var clientJar = FileUtil.safeReadFile(File(FileAssetsUtil.getPath(clientJarHash)), false)?.readZipArchive()
if (clientJar == null) {
val downloaded = FileAssetsUtil.downloadAndGetAsset(profile.source.launcherPackages.formatPlaceholder(
"fullHash" to clientJarHash,
"filename" to "client.jar",
), false, FileAssetsUtil.HashTypes.SHA1)
val downloaded = FileAssetsUtil.downloadAndGetAsset(
profile.source.pistonObjects.formatPlaceholder(
"fullHash" to clientJarHash,
"filename" to "client.jar",
), false, FileAssetsUtil.HashTypes.SHA1
)
check(downloaded.first == clientJarHash) { "Minecraft client.jar verification failed!" }
clientJar = ByteArrayInputStream(downloaded.second).readZipArchive()
}

View File

@ -19,5 +19,5 @@ class SourceC {
var pixlyzer by delegate("https://gitlab.com/bixilon/pixlyzer-data/-/raw/master/hash/\${hashPrefix}/\${fullHash}.mbf?inline=false")
var minecraftResources by delegate("https://resources.download.minecraft.net/\${hashPrefix}/\${fullHash}")
var mojangPackages by delegate("https://launchermeta.mojang.com/v1/packages/\${fullHash}/\${filename}")
var launcherPackages by delegate("https://launcher.mojang.com/v1/objects/\${fullHash}/\${filename}")
var pistonObjects by delegate("https://piston-data.mojang.com/v1/objects/\${fullHash}/\${filename}")
}

View File

@ -14,6 +14,7 @@ package de.bixilon.minosoft.protocol.protocol
@Suppress("UNUSED")
object ProtocolVersions {
const val V_22W24A = 849
const val V_1_19 = 848
const val V_1_19_RC2 = 847
const val V_1_19_RC1 = 846

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,9 @@
{
"849": {
"name": "22w24a",
"protocol_id": 1073741916,
"packets": 841
},
"848": {
"name": "1.19",
"protocol_id": 759,

View File

@ -1,5 +1,21 @@
# Minosoft
# Copyright (C) 2020 Moritz Zwerger
# Copyright (C) 2020-2022 Moritz Zwerger
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# This software is not affiliated with Mojang AB, the original developer of Minecraft.
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# This software is not affiliated with Mojang AB, the original developer of Minecraft.
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#