Run /test as vanilla does in a world without test instances

Model TestCommand's release tree (ResourceSelectorArgument patterns
included) and its finder, locate, pos, stop and clear outcomes when no
test instance block exists. Compare /help's gamerule alternatives as a
set: GameRuleCommand registers them in identity-hash order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-11 16:47:42 +02:00
parent 38059ab9f9
commit 00371a7f35
9 changed files with 243 additions and 7 deletions
+4
View File
@@ -27,6 +27,10 @@ def main():
def walk(v, r, path):
names = list(v.get("children", {}))
# GameRuleCommand registers the rules in a Reference2ObjectOpenHashMap's
# (identity hash) order, which changes from run to run.
if path == ["gamerule"]:
return
order = r.get("order", [])
shared = [n for n in names if n in order]
if shared != [n for n in order if n in names]: