chore: Use 1.19.1 asset URL (#1889)

This commit is contained in:
Alexander Brandes 2022-08-01 09:50:27 +02:00 committed by GitHub
parent 8b95c25194
commit 7a498497c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -353,10 +353,10 @@ public class TextureUtil implements TextureHolder {
LOGGER.info("Downloading asset jar from Mojang, please wait..."); LOGGER.info("Downloading asset jar from Mojang, please wait...");
new File(Fawe.platform().getDirectory() + "/" + Settings.settings().PATHS.TEXTURES + "/").mkdirs(); new File(Fawe.platform().getDirectory() + "/" + Settings.settings().PATHS.TEXTURES + "/").mkdirs();
try (BufferedInputStream in = new BufferedInputStream( try (BufferedInputStream in = new BufferedInputStream(
new URL("https://launcher.mojang.com/v1/objects/2e9a3e3107cca00d6bc9c97bf7d149cae163ef21/client.jar") new URL("https://piston-data.mojang.com/v1/objects/90d438c3e432add8848a9f9f368ce5a52f6bc4a7/client.jar")
.openStream()); .openStream());
FileOutputStream fileOutputStream = new FileOutputStream( FileOutputStream fileOutputStream = new FileOutputStream(
Fawe.platform().getDirectory() + "/" + Settings.settings().PATHS.TEXTURES + "/1.18.2.jar")) { Fawe.platform().getDirectory() + "/" + Settings.settings().PATHS.TEXTURES + "/1.19.1.jar")) {
byte[] dataBuffer = new byte[1024]; byte[] dataBuffer = new byte[1024];
int bytesRead; int bytesRead;
while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) { while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) {
@ -810,10 +810,10 @@ public class TextureUtil implements TextureHolder {
new File(Fawe.platform().getDirectory() + "/" + Settings.settings().PATHS.TEXTURES + "/") new File(Fawe.platform().getDirectory() + "/" + Settings.settings().PATHS.TEXTURES + "/")
.mkdirs(); .mkdirs();
try (BufferedInputStream in = new BufferedInputStream( try (BufferedInputStream in = new BufferedInputStream(
new URL("https://launcher.mojang.com/v1/objects/2e9a3e3107cca00d6bc9c97bf7d149cae163ef21/client.jar") new URL("https://piston-data.mojang.com/v1/objects/90d438c3e432add8848a9f9f368ce5a52f6bc4a7/client.jar")
.openStream()); .openStream());
FileOutputStream fileOutputStream = new FileOutputStream( FileOutputStream fileOutputStream = new FileOutputStream(
Fawe.platform().getDirectory() + "/" + Settings.settings().PATHS.TEXTURES + "/1.18.2.jar")) { Fawe.platform().getDirectory() + "/" + Settings.settings().PATHS.TEXTURES + "/1.19.1.jar")) {
byte[] dataBuffer = new byte[1024]; byte[] dataBuffer = new byte[1024];
int bytesRead; int bytesRead;
while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) { while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) {