mojira.dev
MC-219527

Mobs Spawned in with commands which often not have the correct drop chances

When summoning in a mob with custom drop chances the game will often completely ignore them and default to 0.085f for armour and mainhand, and 0 for offhand, this is quite annoying as my datapack relies on these for its functionality.

e.g.
execute as @e[type=bat,sort=nearest] at @s in overworld if score @p UndeadMTimer matches 4000 if entity @s[y=45,dy=-1000] run summon husk   ~ {CustomNameVisible:1b,Health:80f,Tags:["UndeadMiner"],CustomName:'{"text":"Undead Miner"}',HandItems:[{id:"minecraft:iron_pickaxe",Count:1b,tag:{display:{Name:'{"text":"Undead Pickaxe","italic":false}'},Unbreakable:1b,UndeadPickaxe:1b,Enchantments:[{id:"minecraft:efficiency",lvl:6s},{id:"minecraft:fortune",lvl:2s}]}},{id:"minecraft:magma_cream",Count:1b,tag:{display:{Name:'{"text":"Lava Charm","italic":false}'},HideFlags:1,LavaCharm:1b,Enchantments:[{id:"minecraft:protection",lvl:1s}]}}],HandDropChances:[0.010F,0.010F],ArmorItems:[{id:"minecraft:gold_ingot",Count:2b},{id:"minecraft:iron_ingot",Count:3b},{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{Name:'{"text":"Miner\'s Vest","italic":false}',color:14253891},HideFlags:68,Unbreakable:1b,MinerVest:1b,AttributeModifiers:[{AttributeName:"generic.max_health",Name:"generic.max_health",Amount:4,Operation:0,UUID:[I;109573649,-263108086,-1504187031,-2000370201],Slot:"chest"},{AttributeName:"generic.armor",Name:"generic.armor",Amount:5,Operation:0,UUID:[I;1676236295,-1057929584,-1600646532,1196264260],Slot:"chest"}]}},{id:"minecraft:glowstone",Count:1b}],ArmorDropChances:[0.300F,0.500F,0.010F,0.000F],Attributes:[{Name:"generic.max_health",Base:76},{Name:"generic.attack_damage",Base:7},{Name:"generic.armor",Base:6}]}
 
will have different drop rates.

Comments 3

Please include the exact command used

Can't reproduce, the drop chances are set properly for me when using that command

Noah Melkonian

(Unassigned)

Unconfirmed

(Unassigned)

command, mob

21w10a

Retrieved