I wanted to detect when a player injures/kills an end crystal to trigger a message via an invisible advancement reward mcfunction. It turns out... injuring (or killing, I tried both) an end_crystal does not trigger the advancement. The advancement, as written, if you substitute sheep for end_crystal, does detect injury (or killing) of sheep, so the bug appears specific to the end_crystal entity type.
[edit to fix quote to code]
{
"display": {
"title": {
"text": "Destroy End Crystal"
},
"description": {
"text": "Destroy End Crystal"
},
"icon": {
"item": "minecraft:end_crystal"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false,
"background": "minecraft:textures/gui/advancements/backgrounds/stone.png"
},
"criteria": {
"injure_crystal": {
"trigger": "minecraft:player_hurt_entity",
"conditions": {
"entity": {
"type": "minecraft:end_crystal"
}
}
}
},
"requirements": [
["injure_crystal"]
]
}
Linked issues
Comments 2
Thank you for your report!
We're tracking this issue in MC-117824, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! Please report any issues on Discord or Reddit
Still affects including 1.16.4 as well.