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:
@@ -132,8 +132,14 @@ MASKS = [
|
||||
]
|
||||
|
||||
|
||||
GAMERULES = re.compile(r'/gamerule \(([^)]*)\)')
|
||||
|
||||
|
||||
def masked(record):
|
||||
text = json.dumps(record['messages'], ensure_ascii=False)
|
||||
# GameRuleCommand registers the rules in identity-hash order, different
|
||||
# in every JVM: compare /help's gamerule alternatives as a set.
|
||||
text = GAMERULES.sub(lambda m: '/gamerule (' + '|'.join(sorted(m.group(1).split('|'))) + ')', text)
|
||||
for pattern, replacement in MASKS:
|
||||
text = pattern.sub(replacement, text)
|
||||
return text
|
||||
|
||||
Reference in New Issue
Block a user