From cdd5b3dc5fe50165b847abba9f5db7925cc2b4c9 Mon Sep 17 00:00:00 2001 From: Chip <65827213+ChipmunkMC@users.noreply.github.com> Date: Wed, 22 Feb 2023 23:20:57 -0500 Subject: [PATCH] this commit either improves reliability or does nothing at all --- src/main/java/land/chipmunk/chipmunkbot/Client.java | 4 ++-- .../java/land/chipmunk/chipmunkbot/song/NBSConverter.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/land/chipmunk/chipmunkbot/Client.java b/src/main/java/land/chipmunk/chipmunkbot/Client.java index fcff9e6..e0f5a6a 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/Client.java +++ b/src/main/java/land/chipmunk/chipmunkbot/Client.java @@ -29,8 +29,6 @@ public class Client { final Session session = new TcpClientSession(options.host(), options.port(), options.protocol(), options.proxy()); this.session = session; - session.connect(); - session.addListener(new SessionAdapter () { @Override public void packetReceived(Session session, Packet packet) { for (SessionListener listener : listeners) listener.packetReceived(session, packet); } @Override public void packetSending (PacketSendingEvent event) { for (SessionListener listener : listeners) listener.packetSending(event); } @@ -55,6 +53,8 @@ public class Client { new Timer().schedule(task, options.reconnectDelay()); } }); + + session.connect(); } public long reconnectDelay () { return options.reconnectDelay(); } diff --git a/src/main/java/land/chipmunk/chipmunkbot/song/NBSConverter.java b/src/main/java/land/chipmunk/chipmunkbot/song/NBSConverter.java index 6cf5f1a..2e5083e 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/song/NBSConverter.java +++ b/src/main/java/land/chipmunk/chipmunkbot/song/NBSConverter.java @@ -164,7 +164,7 @@ public class NBSConverter { if (index >= customInstruments.size()) continue; NBSCustomInstrument customInstrument = customInstruments.get(index); instrument = Instrument.of(customInstrument.name); - key += customInstrument.pitch; + // key += customInstrument.pitch; } if (key < 33 || key > 57) {