Minecraft – Can you get a dragon head by killing it with charged creepers

minecraft-java-edition

According to Minecraft Wiki, I can get heads from killing a mob using Charged Creepers (except for wither skeletons). However, is there a way for me to get Dragon heads by killing Ender Dragons with creepers? I wanted to ask before I try as I did not want my efforts to be wasted.(my trident is breaking)

Any help on this question will be deeply appreciated.

Best Answer

The fact it's not possible can also be verified by looking at the Ender Dragon's loot table in the default datapack which has the following content:

{
  "type": "minecraft:entity"
}

I.e. no item drops at all. You should be able to enable it with a loot table such as this one:

{
  "type": "minecraft:entity",
  "pools": [
    {
      "rolls": 1.0,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:dragon_head"
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:entity_properties",
          "predicate": {
            "type": "minecraft:creeper",
            "nbt": "{Charged:1b}"
          },
          "entity": "killer"
        }
      ]
    }
  ]
}