diff --git a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java index f7e3bd43d..5698f34a8 100644 --- a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java +++ b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java @@ -936,19 +936,7 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource { // This isn't a great solution, but... we want to make sure the finish configuration packet cannot be sent // before the KnownPacks packet. - this.downstream.getSession().addListener(new ClientListener(ProtocolState.LOGIN, loginEvent.transferring()) { - @Override - public void packetReceived(Session session, Packet packet) { - if (protocol.getState() == ProtocolState.CONFIGURATION) { - if (packet instanceof ClientboundFinishConfigurationPacket) { - // Prevent - GeyserSession.this.ensureInEventLoop(() -> GeyserSession.this.sendDownstreamPacket(new ServerboundFinishConfigurationPacket())); - return; - } - } - super.packetReceived(session, packet); - } - }); + this.downstream.getSession().addListener(new ClientListener(ProtocolState.LOGIN, loginEvent.transferring())); downstream.addListener(new SessionAdapter() { @Override @@ -1694,8 +1682,8 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource { return; } - if (protocol.getState() != intendedState) { - geyser.getLogger().debug("Tried to send " + packet.getClass().getSimpleName() + " packet while not in " + intendedState.name() + " state"); + if (protocol.getOutboundState() != intendedState) { + geyser.getLogger().debug("Tried to send " + packet.getClass().getSimpleName() + " packet while not in " + intendedState.name() + " outbound state"); return; } @@ -1729,7 +1717,7 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource { } private void sendDownstreamPacket0(Packet packet) { - ProtocolState state = protocol.getState(); + ProtocolState state = protocol.getOutboundState(); if (state == ProtocolState.GAME || state == ProtocolState.CONFIGURATION || packet.getClass() == ServerboundCustomQueryAnswerPacket.class) { downstream.sendPacket(packet); } else { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 58b5310ac..169c15bf1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,7 @@ websocket = "1.5.1" protocol = "3.0.0.Beta2-20240704.153116-14" raknet = "1.0.0.CR3-20240416.144209-1" minecraftauth = "4.1.0" -mcprotocollib = "1.21-20240725.013034-16" +mcprotocollib = "1341744" adventure = "4.14.0" adventure-platform = "4.3.0" junit = "5.9.2" @@ -108,7 +108,7 @@ guava = { group = "com.google.guava", name = "guava", version.ref = "guava" } gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" } junit = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit" } minecraftauth = { group = "net.raphimc", name = "MinecraftAuth", version.ref = "minecraftauth" } -mcprotocollib = { group = "org.geysermc.mcprotocollib", name = "protocol", version.ref = "mcprotocollib" } +mcprotocollib = { group = "com.github.AlexProgrammerDE", name = "MCProtocolLib", version.ref = "mcprotocollib" } raknet = { group = "org.cloudburstmc.netty", name = "netty-transport-raknet", version.ref = "raknet" } terminalconsoleappender = { group = "net.minecrell", name = "terminalconsoleappender", version.ref = "terminalconsoleappender" } velocity-api = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }