From 3d7b15fac4c04c054726766dc91335b6ab5d677e Mon Sep 17 00:00:00 2001 From: Arthur Naseef Date: Mon, 4 Sep 2023 17:57:50 -0700 Subject: [PATCH] Fix serialization of ClientboundCommandsPacket for command types RESOURCE_OR_TAG_KEY and RESOURCE_KEY. (#741) --- .../packet/ingame/clientbound/ClientboundCommandsPacket.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/clientbound/ClientboundCommandsPacket.java b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/clientbound/ClientboundCommandsPacket.java index 18d2b7e8f..98758ee89 100644 --- a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/clientbound/ClientboundCommandsPacket.java +++ b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/clientbound/ClientboundCommandsPacket.java @@ -308,8 +308,10 @@ public void serialize(ByteBuf out, MinecraftCodecHelper helper) { case TIME: out.writeInt(((TimeProperties) node.getProperties()).getMin()); break; - case RESOURCE: case RESOURCE_OR_TAG: + case RESOURCE_OR_TAG_KEY: + case RESOURCE: + case RESOURCE_KEY: helper.writeString(out, ((ResourceProperties) node.getProperties()).getRegistryKey()); break; default: