-
Bug
-
Resolution: Unresolved
-
None
-
1.15.2, 20w10a, 20w14a, 20w16a, 1.16.1, 1.16.2 Release Candidate 1, 20w49a, 21w03a, 21w37a, 1.19, 1.19.2, 1.20.2, 1.21.1
-
Confirmed
-
Commands, Loot tables
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 clovee can be found in this comment