3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-27 08:30:12 +01:00

update protocol lib to resolve command crashing (#4493)

Dieser Commit ist enthalten in:
chris 2024-03-13 20:25:30 +01:00 committet von GitHub
Ursprung a9467cf150
Commit 39b05e284e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
3 geänderte Dateien mit 2 neuen und 17 gelöschten Zeilen

Datei anzeigen

@ -602,13 +602,6 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
@Setter @Setter
private @Nullable ItemData currentBook = null; private @Nullable ItemData currentBook = null;
/**
* Stores if we've sent AvailibleCommandsPacket to the client due to it crashing if sent twice on 1.20.70/71
* Hopefully bedrock will have a hotfix so we can remove this
*/
@Setter
private boolean sentAvailibleCommands = false;
private final GeyserCameraData cameraData; private final GeyserCameraData cameraData;
private final GeyserEntityData entityData; private final GeyserEntityData entityData;

Datei anzeigen

@ -46,7 +46,6 @@ import org.geysermc.geyser.GeyserImpl;
import org.geysermc.geyser.api.event.java.ServerDefineCommandsEvent; import org.geysermc.geyser.api.event.java.ServerDefineCommandsEvent;
import org.geysermc.geyser.command.GeyserCommandManager; import org.geysermc.geyser.command.GeyserCommandManager;
import org.geysermc.geyser.inventory.item.Enchantment; import org.geysermc.geyser.inventory.item.Enchantment;
import org.geysermc.geyser.network.GameProtocol;
import org.geysermc.geyser.registry.BlockRegistries; import org.geysermc.geyser.registry.BlockRegistries;
import org.geysermc.geyser.registry.Registries; import org.geysermc.geyser.registry.Registries;
import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.session.GeyserSession;
@ -116,12 +115,6 @@ public class JavaCommandsTranslator extends PacketTranslator<ClientboundCommands
return; return;
} }
// Don't send command suggestions if they are already sent and the client is 1.20.70 or higher due to crash bug
// TODO: Remove this check when the crash bug is fixed
if (session.isSentAvailibleCommands() && !GameProtocol.isPre1_20_70(session)) {
return;
}
GeyserCommandManager manager = session.getGeyser().commandManager(); GeyserCommandManager manager = session.getGeyser().commandManager();
CommandNode[] nodes = packet.getNodes(); CommandNode[] nodes = packet.getNodes();
List<CommandData> commandData = new ArrayList<>(); List<CommandData> commandData = new ArrayList<>();
@ -198,7 +191,6 @@ public class JavaCommandsTranslator extends PacketTranslator<ClientboundCommands
// Finally, send the commands to the client // Finally, send the commands to the client
session.sendUpstreamPacket(availableCommandsPacket); session.sendUpstreamPacket(availableCommandsPacket);
session.setSentAvailibleCommands(true);
} }
/** /**

Datei anzeigen

@ -9,8 +9,8 @@ netty = "4.1.103.Final"
guava = "29.0-jre" guava = "29.0-jre"
gson = "2.3.1" # Provided by Spigot 1.8.8 gson = "2.3.1" # Provided by Spigot 1.8.8
websocket = "1.5.1" websocket = "1.5.1"
protocol = "3.0.0.Beta1-20240226.201527-125" protocol = "3.0.0.Beta1-20240313.120922-126"
protocol-connection = "3.0.0.Beta1-20240226.201527-124" protocol-connection = "3.0.0.Beta1-20240313.120922-125"
raknet = "1.0.0.CR1-20231206.145325-12" raknet = "1.0.0.CR1-20231206.145325-12"
blockstateupdater="1.20.70-20240303.125052-2" blockstateupdater="1.20.70-20240303.125052-2"
mcauthlib = "d9d773e" mcauthlib = "d9d773e"