dedicated_server harness: compare the op's command feedback on the console, and a score on @s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-17 15:41:19 +02:00
parent e2f2177b60
commit 8912d5d269
2 changed files with 13 additions and 6 deletions
@@ -643,6 +643,11 @@ public final class VanillaProtocolClient {
+ " minecraft:furnace"));
send(new ServerboundChatCommandPacket("give @s minecraft:raw_iron"));
send(new ServerboundChatCommandPacket("give @s minecraft:coal"));
// A score on @s is the player's own (its feedback reaches the console: broadcast);
// a query's reply doesn't.
send(new ServerboundChatCommandPacket("scoreboard objectives add parity dummy"));
send(new ServerboundChatCommandPacket("scoreboard players set @s parity 3"));
send(new ServerboundChatCommandPacket("scoreboard players get @s parity"));
step++;
stepAt = now;
} else if (step == 7 + REPLIES.length && now - stepAt > 1500) {
+8 -6
View File
@@ -13,7 +13,8 @@ the same files), chats, runs /list and commands that fail (`/random value
7..7`, `/random value x`, `/trigger nope`), trades, is made an operator by
the console, runs /kill, respawns (as vanilla's LevelLoadTracker waits: until the "level
chunks load start" event and the chunk under the player), sets a furnace
beside itself, gives itself raw iron and coal, opens the furnace, shift-clicks
beside itself, gives itself raw iron and coal, sets and asks its own score
(`@s`), opens the furnace, shift-clicks
the ore and the coal in and the ingot out, and leaves. The
console then runs `list` and `say` and `stop`. Compared, all of them
exactly:
@@ -33,7 +34,9 @@ exactly:
player respawned (guests' death messages aren't Horizon's yet: left out);
- the furnace menu: its type and title, its contents, the slots each
shift-click changes and its lit and cooking totals;
- the console lines about the player, the chat, `list`, `say` and `stop`;
- the console lines about the player (an operator's command feedback, which
vanilla broadcasts to the console, included), the chat, `list`, `say` and
`stop`;
- the files the servers leave: server.properties (but the date line),
eula.txt, ops.json, whitelist.json, banned-players.json, banned-ips.json,
usercache.json (but the date the player's entry expires).
@@ -209,10 +212,9 @@ CONSOLE_LINE = re.compile(r'^\[\d\d:\d\d:\d\d\] \[([^\]]+)\]: (.*)$')
KEPT = re.compile(r'Tester|\[Server\]|\[Not Secure\]|There are|Stopping|Saving|ThreadedAnvilChunkStorage|All dimensions|Unknown or incomplete')
# Guests' death messages, the op's command feedback broadcast to the console and guests'
# advancement announcements aren't Horizon's yet (the client's own transcript leaves the
# death message out as well).
NOT_YET = re.compile(r'Tester was killed|Killed Tester|System chat: \[Tester: |Tester has made the advancement')
# Guests' death messages and advancement announcements aren't Horizon's yet (the client's
# own transcript leaves the death message out as well).
NOT_YET = re.compile(r'Tester was killed|Tester has made the advancement')
def console_lines(lines):