command_exec harness: start the script without the random sequences of mobs that died before it

/random reset * in the ticking group counted 12 sequences in vanilla against Horizon's 11 on one CI run (#1585).
Locally 1 oracle run in 24 did the same, and its extra sequence was minecraft:entities/bat. Before the setup's
gamerules (spawn_mobs and mob_drops off), the oracle ticks until the entities around the player have loaded, a
number of ticks that depends on the machine; mobs spawn meanwhile, and a bat that died then rolled its loot table.
Once mob_drops is off no mob death rolls one (LivingEntity.shouldDropLoot), so the setup now ends with an
unrecorded /random reset *: every run starts the script with no sequence, and the later count holds only what the
corpus itself rolled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-25 05:32:36 +01:00
parent 4a675206b1
commit afb3ae79a2
+5
View File
@@ -36,6 +36,11 @@ def group_setup():
*setup('/kill @e[type=!player]'),
{'op': 'tick', 'n': 25},
*setup('/fill 0 200 0 15 228 15 air', '/time set 1000', '/weather clear', '/difficulty normal', '/clear @s'),
# Before the gamerules above, while the oracle waits for its entities to load (a number of ticks that
# depends on the machine), mobs spawn and some die with their drops on: a bat's death rolled
# minecraft:entities/bat on 1 vanilla run in 24, one more sequence for the ticking group's
# /random reset * to count. Every run starts the script without them.
*setup('/random reset *'),
]