diff --git a/Loader/src/main/java/de/com/baseband/launcher/Loader.java b/Loader/src/main/java/de/com/baseband/launcher/Loader.java index 68714a6..ee2b3b0 100644 --- a/Loader/src/main/java/de/com/baseband/launcher/Loader.java +++ b/Loader/src/main/java/de/com/baseband/launcher/Loader.java @@ -6,14 +6,12 @@ import de.com.baseband.launcher.security.impl.AntiInstrumentationImpl; import de.com.baseband.launcher.security.impl.JVMArgImpl; import de.com.baseband.launcher.util.GitHash; import de.com.baseband.launcher.util.RSAKey; -import de.com.baseband.launcher.util.SecondCounter; import de.com.baseband.launcher.util.Util; import de.tudbut.io.TypedInputStream; import de.tudbut.io.TypedOutputStream; import de.tudbut.net.http.HTTPUtils; import de.tudbut.parsing.TCN; import de.tudbut.tools.Hasher; -import de.tudbut.tools.Lock; import de.tudbut.tools.Tools; import de.tudbut.tools.encryption.Key; import de.tudbut.tools.encryption.RawKey; @@ -31,7 +29,6 @@ import java.net.Socket; import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; -import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; @@ -91,19 +88,6 @@ public class Loader implements Util { exit(); } else if(status == Response.OK) { LOGGER.info(status.name); - SecondCounter secondCounter = new SecondCounter(); - AtomicBoolean downloaded = new AtomicBoolean(false); - Thread thread = new Thread(() -> { - while(!downloaded.get()) { - new Lock().waitHere(2000); - if (secondCounter.getCount() == 0) { - LOGGER.warn("BaseBand appears to have stopped downloading."); - } else { - LOGGER.warn("BaseBand is downloading at a rate of " + (secondCounter.getCount() / 1024) + " kilobytes per second. (if this seems low then restart your game.)"); - } - } - }); - thread.start(); try { TCN clientData = TCN.readMap(Tools.stringToMap(key.decryptString(inputStream.readString()))); @@ -111,14 +95,9 @@ public class Loader implements Util { RawKey rk = new RawKey(key.toBytes()); int n = inputStream.readInt(); for (int i = 0; i < n; i++) { - String name = inputStream.readString(); - byte[] bytes = inputStream.readByteArray(); - data.put(rk.decryptString(name), rk.decryptBytes(bytes)); - secondCounter.increment(bytes.length); + data.put(rk.decryptString(inputStream.readString()), rk.decryptBytes(inputStream.readByteArray())); } - downloaded.set(true); LOGGER.info("BaseBand downloaded: {} classes.", data.size()); - thread.stop(); classLoader = new CustomClassLoader(data); classLoader.inject(); classLoader.informClient(clientData);