Death loot table seed won't work with "/loot" command on mobs
The bug
The NBT tag of mobs DeathLootTableSeed can only affect the loot when the mob actually dies. However when you use "/loot kill" command on the mob, the loot is still random instead of fixed.
How to reproduce
- Summon a sheep with a certain loot table seed:
/summon minecraft:sheep ~ ~ ~ {DeathLootTable:"minecraft:entities/sheep",DeathLootTableSeed:123} - Kill it:
/kill @e[sort=nearest,type=sheep,limit=1]
→ You will get exactly 2 piece of mutton.
- Summon the sheep again and use /loot command on it:
/loot give @s kill @e[sort=nearest,type=sheep,limit=1]
→ You know how many mutton you get
Code Analysis
Code analysis by clove can be found in this comment