Merge the End crystal and dragon selectors into the cross-level selectors

Both pull requests reshape Game::select in game/commands.rs, so the
cross-level branch now carries the End crystal and dragon candidates as
well: the crystals and the dragon are listed by level_candidates, and
level_holds knows them, so an unbounded selector finds them in the level
that holds them.

Co-Authored-By: minimax-m3.1-flash (Claude Code) <noreply@users.noreply.github.com>
This commit is contained in:
levzzz
2026-10-27 09:33:56 +05:00
6 changed files with 117 additions and 5 deletions
+11
View File
@@ -327,6 +327,17 @@ def entities():
cmd('/data get entity @e[tag=attr,limit=1] Health'),
cmd('/attribute @e[tag=attr,limit=1] minecraft:attack_damage base get'),
cmd('/kill @e[tag=attr]'),
# An End crystal is an entity of its own: a type selector finds it,
# reads it and kills it (#1531).
cmd('/summon minecraft:end_crystal 4.5 210 8.5'),
cmd('/execute if entity @e[type=minecraft:end_crystal]'),
cmd('/data get entity @e[type=minecraft:end_crystal,limit=1] Pos'),
cmd('/kill @e[type=minecraft:end_crystal]'),
cmd('/execute if entity @e[type=minecraft:end_crystal]'),
cmd('/summon minecraft:ender_dragon 4.5 210 8.5'),
cmd('/execute if entity @e[type=minecraft:ender_dragon]'),
cmd('/data get entity @e[type=minecraft:ender_dragon,limit=1] Pos'),
cmd('/kill @e[type=minecraft:ender_dragon]'),
*setup('/kill @e[type=minecraft:armor_stand]'),
{'op': 'tick', 'n': 25},
cmd('/execute if entity @e[tag=h]'),