port_map: rest-002's tag, component and lightning notes cite the code

`TagPredicate.matches` pointed at `id_matches`, which matches an id or a tag
for items and entities and has no `expected` flag; the method's only caller
is `DamageSourcePredicate.matches`, and `damage_source` is where the flag is
honoured: each damage type's tag compared against it.

`SingleComponentItemPredicate.matches` said other components are ignored.
It now names one the shipped data asks for: `minecraft:jukebox_playable` in
adventure/play_jukebox_in_meadows, where the item predicate has nothing else
to test, so any tool passes it.

`LightningBoltPredicate.matches` said `blocks_set_on_fire` was checked
against 0 and the trigger never fired. Both hold no longer: the arm compares
the bolt's own count, which `game/lightning.rs` fills from the fires it set,
and `game/advancements.rs::trigger_lightning_strike` fires the trigger.
This commit is contained in:
MSedgeMC committed 2026-11-02 14:27:57 +00:00
1 parent 8bebe92031
commit 97fe3e6ec9
1 file changed
+3 -3
+3 -3
View File
@@ -19,7 +19,7 @@ MobEffectsPredicate.matches inline crates/horizon-client/src/advancements.rs::en
MobEffectsPredicate.Builder.and skip:java builder for effect predicates in code
MobEffectsPredicate.MobEffectInstancePredicate.matches inline crates/horizon-client/src/advancements.rs::entity gap: minor: ambient and visible flags are not checked; amplifier and duration are
NbtPredicate.matches missing minor: custom_data and entity NBT predicates are not read; no vanilla advancement uses them
SingleComponentItemPredicate.matches inline crates/horizon-client/src/advancements.rs::item gap: minor: only enchantments, damage and potion contents are read; other components are ignored
SingleComponentItemPredicate.matches inline crates/horizon-client/src/advancements.rs::item gap: minor: enchantments, damage and potion contents are read from components and predicates; adventure/play_jukebox_in_meadows asks for minecraft:jukebox_playable, which is ignored, so any tool passes that match_tool test
SlotsPredicate.matches missing minor: slot-range item test is not read; no vanilla advancement uses it
SlotsPredicate.matchSlots missing minor: helper of SlotsPredicate.matches; not read
StatePropertiesPredicate.matches port crates/horizon-client/src/advancements.rs::block the state property test of block()
@@ -32,7 +32,7 @@ StatePropertiesPredicate.RangedMatcher.match inline crates/horizon-client/src/ad
TagPredicate.codec skip:java codec
TagPredicate.is skip:java builder
TagPredicate.isNot skip:java builder
TagPredicate.matches inline crates/horizon-client/src/advancements.rs::id_matches gap: minor: the #tag form is read; the negated expected=false form is not kept
TagPredicate.matches inline crates/horizon-client/src/advancements.rs::damage_source each of the damage type's tags compared against the predicate's expected flag; DamageSourcePredicate.matches is the only caller (adventure/blowback asks for #minecraft:is_projectile with expected true)
CubeMobPredicate.matches inline crates/horizon-world/src/loot.rs::Context::entity_matches the loot reader's minecraft:type_specific/cube_mob arm, the size bounds against the mob's own size; entity() in advancements.rs has no arm for it and answers false, so an advancement asking for one never matches
DistanceToPlayerPredicate.matches port crates/horizon-client/src/advancements.rs::distance the distance key of entity(): from the player to the entity
EntityEquipmentPredicate.captainPredicate skip:data datagen builder for the raid captain predicate (VanillaAdventureAdvancements)
@@ -55,7 +55,7 @@ EntityTagPredicate.containsAllOf missing minor: helper of entity_tags; not read
EntityTypePredicate.of skip:java builder from an entity type or tag
EntityTypePredicate.matches port crates/horizon-client/src/advancements.rs::id_matches the type key of entity(): an id or #tag
FishingHookPredicate.matches inline crates/horizon-client/src/advancements.rs::entity the type_specific/fishing_hook arm: open-water test
LightningBoltPredicate.matches inline crates/horizon-client/src/advancements.rs::entity gap: minor: blocks_set_on_fire is checked against 0, not the bolt's own count; the lightning trigger never fires
LightningBoltPredicate.matches inline crates/horizon-client/src/advancements.rs::entity the minecraft:type_specific/lightning arm: blocks_set_on_fire against the bolt's own count (game/lightning.rs fills it from the fires the bolt set) and entity_struck against the mobs around it
MovementAffectedByPredicate.matches missing minor: movement_affected_by key is not read; no vanilla advancement uses it
MovementPredicate.matches missing minor: movement key (speed, fall distance) is not read; no vanilla advancement uses it
PassengerPredicate.matches inline crates/horizon-client/src/advancements.rs::entity the `passenger` key: any passenger of the vehicle matches the nested predicate
1 InputPredicate.matches inline crates/horizon-client/src/advancements.rs::input gap: only the sneak input is read; forward, back, jump and sprint have no source here yet and count as unconstrained
19 MobEffectsPredicate.Builder.and skip:java builder for effect predicates in code
20 MobEffectsPredicate.MobEffectInstancePredicate.matches inline crates/horizon-client/src/advancements.rs::entity gap: minor: ambient and visible flags are not checked; amplifier and duration are
21 NbtPredicate.matches missing minor: custom_data and entity NBT predicates are not read; no vanilla advancement uses them
22 SingleComponentItemPredicate.matches inline crates/horizon-client/src/advancements.rs::item gap: minor: only enchantments, damage and potion contents are read; other components are ignored gap: minor: enchantments, damage and potion contents are read from components and predicates; adventure/play_jukebox_in_meadows asks for minecraft:jukebox_playable, which is ignored, so any tool passes that match_tool test
23 SlotsPredicate.matches missing minor: slot-range item test is not read; no vanilla advancement uses it
24 SlotsPredicate.matchSlots missing minor: helper of SlotsPredicate.matches; not read
25 StatePropertiesPredicate.matches port crates/horizon-client/src/advancements.rs::block the state property test of block()
32 TagPredicate.codec skip:java codec
33 TagPredicate.is skip:java builder
34 TagPredicate.isNot skip:java builder
35 TagPredicate.matches inline crates/horizon-client/src/advancements.rs::id_matches crates/horizon-client/src/advancements.rs::damage_source gap: minor: the #tag form is read; the negated expected=false form is not kept each of the damage type's tags compared against the predicate's expected flag; DamageSourcePredicate.matches is the only caller (adventure/blowback asks for #minecraft:is_projectile with expected true)
36 CubeMobPredicate.matches inline crates/horizon-world/src/loot.rs::Context::entity_matches the loot reader's minecraft:type_specific/cube_mob arm, the size bounds against the mob's own size; entity() in advancements.rs has no arm for it and answers false, so an advancement asking for one never matches
37 DistanceToPlayerPredicate.matches port crates/horizon-client/src/advancements.rs::distance the distance key of entity(): from the player to the entity
38 EntityEquipmentPredicate.captainPredicate skip:data datagen builder for the raid captain predicate (VanillaAdventureAdvancements)
55 EntityTypePredicate.of skip:java builder from an entity type or tag
56 EntityTypePredicate.matches port crates/horizon-client/src/advancements.rs::id_matches the type key of entity(): an id or #tag
57 FishingHookPredicate.matches inline crates/horizon-client/src/advancements.rs::entity the type_specific/fishing_hook arm: open-water test
58 LightningBoltPredicate.matches inline crates/horizon-client/src/advancements.rs::entity gap: minor: blocks_set_on_fire is checked against 0, not the bolt's own count; the lightning trigger never fires the minecraft:type_specific/lightning arm: blocks_set_on_fire against the bolt's own count (game/lightning.rs fills it from the fires the bolt set) and entity_struck against the mobs around it
59 MovementAffectedByPredicate.matches missing minor: movement_affected_by key is not read; no vanilla advancement uses it
60 MovementPredicate.matches missing minor: movement key (speed, fall distance) is not read; no vanilla advancement uses it
61 PassengerPredicate.matches inline crates/horizon-client/src/advancements.rs::entity the `passenger` key: any passenger of the vehicle matches the nested predicate