-
Bug
-
Resolution: Works As Intended
-
None
-
1.20.6, 1.21 Pre-Release 2, 1.21 Pre-Release 4, 1.21 Release Candidate 1, 1.21
-
Community Consensus
-
Advancements
the following advancement should trigger when a player picks up a bucket of tropical fish with the `BucketVariantTag` set to `67502593`:
{ "display": { "icon": { "id": "minecraft:warped_fungus", "count": 1 }, "title": { "text": "triggered" }, "description": { "translate": "advancements.husbandry.tactical_fishing.description" } }, "parent": "minecraft:husbandry/fishy_business", "criteria": { "tropical_fish_bucket": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "items": "minecraft:tropical_fish_bucket", "components": { "minecraft:bucket_entity_data": { "BucketVariantTag":67502593 } } } ] } } }, "requirements": [ [ "tropical_fish_bucket" ] ], "sends_telemetry_event": false }
However it doesn't work because the components needs an exact match as most naturally caught tropical fish would have a health tag, an exact match can be created with
/give @s minecraft:tropical_fish_bucket[minecraft:bucket_entity_data={BucketVariantTag:67502593}]
This is because the components need to match exactly, the current system doesn't allow for selective tag matching, previous verions would allow for specific tag matching with
"trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "items": [ "minecraft:tropical_fish_bucket" ], "nbt": "{BucketVariantTag: 67502593}" } ] }
this is now missing functionality caused form the component system
How to reproduce:
- Add datapack-BucketVariantTag.tag to a world
- Spawn a tropical fish with `BucketVariantTag` set to 67502593
- Catch the fish in a water bucket and that should trigger the advancement but it won't
- if you use the following command it will give you a tropical fish bucket where the "minecraft:bucket_entity_data" component is composed solely of the BucketVariantTag
/give @s minecraft:tropical_fish_bucket[minecraft:bucket_entity_data={BucketVariantTag:67502593}]
- if you now place that fish in water
- clear you advancements
- pick the fish in a bucket it will no longer trigger the advancement as it now ill hvae a health tag inside the "minecraft:bucket_entity_data" tag
Expected result:
- the advancement should trigger when a fish with the "BucketVariantTag" of 67502593 is caught
Actual result:
- the advancements do not trigger unless the "BucketVariantTag" is the only tag in "minecraft:bucket_entity_data"
I've included the datapack for testing