Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 15:00:11 +01:00
Update to new MCPL
Dieser Commit ist enthalten in:
Ursprung
5ebb16a192
Commit
d353df2b7a
@ -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
|
// This isn't a great solution, but... we want to make sure the finish configuration packet cannot be sent
|
||||||
// before the KnownPacks packet.
|
// before the KnownPacks packet.
|
||||||
this.downstream.getSession().addListener(new ClientListener(ProtocolState.LOGIN, loginEvent.transferring()) {
|
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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
downstream.addListener(new SessionAdapter() {
|
downstream.addListener(new SessionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
@ -1694,8 +1682,8 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (protocol.getState() != intendedState) {
|
if (protocol.getOutboundState() != intendedState) {
|
||||||
geyser.getLogger().debug("Tried to send " + packet.getClass().getSimpleName() + " packet while not in " + intendedState.name() + " state");
|
geyser.getLogger().debug("Tried to send " + packet.getClass().getSimpleName() + " packet while not in " + intendedState.name() + " outbound state");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1729,7 +1717,7 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void sendDownstreamPacket0(Packet packet) {
|
private void sendDownstreamPacket0(Packet packet) {
|
||||||
ProtocolState state = protocol.getState();
|
ProtocolState state = protocol.getOutboundState();
|
||||||
if (state == ProtocolState.GAME || state == ProtocolState.CONFIGURATION || packet.getClass() == ServerboundCustomQueryAnswerPacket.class) {
|
if (state == ProtocolState.GAME || state == ProtocolState.CONFIGURATION || packet.getClass() == ServerboundCustomQueryAnswerPacket.class) {
|
||||||
downstream.sendPacket(packet);
|
downstream.sendPacket(packet);
|
||||||
} else {
|
} else {
|
||||||
|
@ -13,7 +13,7 @@ websocket = "1.5.1"
|
|||||||
protocol = "3.0.0.Beta2-20240704.153116-14"
|
protocol = "3.0.0.Beta2-20240704.153116-14"
|
||||||
raknet = "1.0.0.CR3-20240416.144209-1"
|
raknet = "1.0.0.CR3-20240416.144209-1"
|
||||||
minecraftauth = "4.1.0"
|
minecraftauth = "4.1.0"
|
||||||
mcprotocollib = "1.21-20240725.013034-16"
|
mcprotocollib = "1341744"
|
||||||
adventure = "4.14.0"
|
adventure = "4.14.0"
|
||||||
adventure-platform = "4.3.0"
|
adventure-platform = "4.3.0"
|
||||||
junit = "5.9.2"
|
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" }
|
gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
|
||||||
junit = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit" }
|
junit = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit" }
|
||||||
minecraftauth = { group = "net.raphimc", name = "MinecraftAuth", version.ref = "minecraftauth" }
|
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" }
|
raknet = { group = "org.cloudburstmc.netty", name = "netty-transport-raknet", version.ref = "raknet" }
|
||||||
terminalconsoleappender = { group = "net.minecrell", name = "terminalconsoleappender", version.ref = "terminalconsoleappender" }
|
terminalconsoleappender = { group = "net.minecrell", name = "terminalconsoleappender", version.ref = "terminalconsoleappender" }
|
||||||
velocity-api = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
|
velocity-api = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren