Merge pull request #2498 from kacpherek/fix/2494-command-block-use

🤖 Agent: Merged by Ludovic's AI agent (Claude, contrib-gate-19). Thanks @kacpherek: Open the command block screen on a server's client and send its edits. I checked it against vanilla 26.3, and it passed every harness it reaches in a union with your other PRs, plus lan_e2e in both modes.
This commit is contained in:
Ludovic Marie
2026-10-27 09:30:58 +01:00
committed by GitHub
5 changed files with 106 additions and 3 deletions
@@ -2163,6 +2163,12 @@ packet!(
/// ServerboundSignUpdatePacket: the four lines the player wrote on a side.
SignUpdate { pos: [i32; 3] => Pos, lines: [String; 4] => SignLines, front: bool => SignSide }
);
packet!(
/// ServerboundSetCommandBlockPacket: the command block's command, its
/// mode (`CommandBlockEntity.Mode` ordinal) and the track output (1),
/// conditional (2) and automatic (4) flags.
SetCommandBlock { pos: [i32; 3] => Pos, command: String => Str, mode: i32 => VarInt, flags: i8 => Byte }
);
packet!(
/// ServerboundEditBookPacket: the book's slot (a hotbar slot, or 40 for
/// the off hand), its pages and, to sign it, its title.
@@ -2330,6 +2336,7 @@ packet_enum!(Serverbound, crate::ids::play::serverbound {
SelectTrade(SelectTrade) = SELECT_TRADE,
SetBeacon(SetBeacon) = SET_BEACON,
SetCarriedItem(SetCarriedItem) = SET_CARRIED_ITEM,
SetCommandBlock(SetCommandBlock) = SET_COMMAND_BLOCK,
SetCreativeModeSlot(SetCreativeModeSlot) = SET_CREATIVE_MODE_SLOT,
SignUpdate(SignUpdate) = SIGN_UPDATE,
UseItem(UseItem) = USE_ITEM,