1. Write a LootTable.
Like this:
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:iron_ingot",
"weight": 1,
"luck": -100
}
]
}
]
}
2. Save to .minecraft \ saves \ map \ data \ loot tables \ command \ loot table
3./effect @p minecraft:luck 3000 0
4./summon Zombie ~ ~ ~ {DeathLootTable:command:loottable}
5. to kill the zombie
6. The zombie will loot iron_ingot(If you are in luck effect)
luck
is not a valid key. The key you want isquality
.