The bug
The advacement 'Oh Shiny' is granted by throwing a gold item near a baby piglin while not wearing any gold armour, even though baby piglins are naturally not angry towards players which doesn't make sense.
To reproduce
Have a gold ingot in your main hand
Go to survival with no gold armor
Drop the gold ingot near the baby piglin
→ ❌ The 'Oh Shiny' advancement is granted.
Attachments
Comments 3
A simple fix would be to add an is_baby predicate flag to check if it is an adult Piglin:
{
"parent": "minecraft:nether/root",
"display": {
"icon": {
"item": "minecraft:gold_ingot"
},
"title": {
"translate": "advancements.nether.distract_piglin.title"
},
"description": {
"translate": "advancements.nether.distract_piglin.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"distract_piglin": {
"trigger": "minecraft:thrown_item_picked_up_by_entity",
"conditions": {
"player": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"predicate": {
"equipment": {
"head": {
"item": "minecraft:golden_helmet"
}
}
},
"entity": "this"
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"predicate": {
"equipment": {
"chest": {
"item": "minecraft:golden_chestplate"
}
}
},
"entity": "this"
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"predicate": {
"equipment": {
"legs": {
"item": "minecraft:golden_leggings"
}
}
},
"entity": "this"
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"predicate": {
"equipment": {
"feet": {
"item": "minecraft:golden_boots"
}
}
},
"entity": "this"
}
}
],
"item": {
"tag": "minecraft:piglin_loved"
},
"entity": [
{
"condition": "minecraft:entity_properties",
"predicate": {
"type": "minecraft:piglin",
"flags": {
"is_baby": false
}
},
"entity": "this"
}
]
}
}
},
"requirements": [
[
"distract_piglin"
]
]
}A simple fix would be to add an is_baby predicate flag to check if it is an adult Piglin:
{
"parent": "minecraft:nether/root",
"display": {
"icon": {
"item": "minecraft:gold_ingot"
},
"title": {
"translate": "advancements.nether.distract_piglin.title"
},
"description": {
"translate": "advancements.nether.distract_piglin.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"distract_piglin": {
"trigger": "minecraft:thrown_item_picked_up_by_entity",
"conditions": {
"player": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"predicate": {
"equipment": {
"head": {
"item": "minecraft:golden_helmet"
}
}
},
"entity": "this"
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"predicate": {
"equipment": {
"chest": {
"item": "minecraft:golden_chestplate"
}
}
},
"entity": "this"
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"predicate": {
"equipment": {
"legs": {
"item": "minecraft:golden_leggings"
}
}
},
"entity": "this"
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"predicate": {
"equipment": {
"feet": {
"item": "minecraft:golden_boots"
}
}
},
"entity": "this"
}
}
],
"item": {
"tag": "minecraft:piglin_loved"
},
"entity": [
{
"condition": "minecraft:entity_properties",
"predicate": {
"type": "minecraft:piglin",
"flags": {
"is_baby": false
}
},
"entity": "this"
}
]
}
}
},
"requirements": [
[
"distract_piglin"
]
]
}