I have tried and failed to summon a mob with a fixed durability item. Every time the entity is killed, it drops the item with a randomized durability, because such is the way. But is there a way to over-ride this and give the item a fixed durability on drop? I have tried:

/summon zombie ~ ~1 ~ {HandItems:[{Count:1,id:stone_sword,tag:{Damage:1,display:{Name:"\"Blade\""}}},{}],HandDropChances:[1.0f,0.0f]}

The test being the "Damage:1" bit.

  • I think you would need to overwrite its loot table for that, but I'm not sure. – Fabian Röling Jan 13 '20 at 6:55
  • Have you tried giving them a placeholder item then replacing it with the exact one you want when they pick it up? – Corsaka Jan 13 '20 at 11:56

You need to override its loot table with your own. To add your own loot table, you will need a data pack (which is a folder from which the game will load your loot table) and you need the loot table itself which you can either write manually or generate using an online loot table generator.

I already made this data pack, you can download it here: https://www.dropbox.com/sh/bc0obb1ffcevdla/AAAmA49J_C-olU25uxGWwwKva?dl=0
to apply it to your save, paste the folder "zombie_loot_table" inside .minecraft/saves/your_save/datapacks and make sure to /reload if you are already in the game.

but in case you want to do it yourself, here is all the information you need:
Data pack structure - https://minecraft.gamepedia.com/Data_pack
loot table generator - https://misode.github.io/loot-table/
my tutorial on loot tables - https://datapackcenter.com/projects/loot-tables.72/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.