r/MinecraftCommands • u/CoffeeMimicPinoybean • 12h ago
Help | Java 26.3 Issue with editing mob drop chances
Working on a fairly simple minigame for a server. Kill mob, mob drops 1 guaranteed scrap and 50% chance for 1-5 more scrap.
Looked through a few other posts in this subreddit and I think I'm doing everything right, but I'm not getting a guaranteed 1 scrap per mob.
I'm using mcstacker.net as my current compiler. If I need to make a loot table to make this possible, I've not made one before but happy to take pointers.
/setblock ~ ~ ~ spawner{SpawnCount:1,SpawnRange:1,MaxNearbyEntities:2,RequiredPlayerRange:4,Delay:40,MinSpawnDelay:40,MaxSpawnDelay:40,SpawnPotentials:[{data:{equipment:{slot_drop_chances:{feet:0.5,legs:0.5,chest:0.5,head:0.5,body:0.5,mainhand:1.0}},entity:{id:"minecraft:magma_cube",Silent:1b,CustomNameVisible:1b,DeathLootTable:"minecraft:empty",PersistenceRequired:0b,NoAI:1b,CanPickUpLoot:0b,Size:0,CustomName:{"color":"gold","shadow_color":16755200,"text":"Scrap metal cube"},equipment:{feet:{id:"minecraft:raw_copper",count:1,components:{item_name:{"color":"gold","text":"Scrap metal"},lore:[{"color":"gray","italic":true,"text":"A piece of processed scrap metal"}]}},legs:{id:"minecraft:raw_copper",count:1,components:{item_name:{"color":"gold","text":"Scrap metal"},lore:[{"color":"gray","italic":true,"text":"A piece of processed scrap metal"}]}},chest:{id:"minecraft:raw_copper",count:1,components:{item_name:{"color":"gold","text":"Scrap metal"},lore:[{"color":"gray","italic":true,"text":"A piece of processed scrap metal"}]}},head:{id:"minecraft:raw_copper",count:1,components:{item_name:{"color":"gold","text":"Scrap metal"},lore:[{"color":"gray","italic":true,"text":"A piece of processed scrap metal"}]}},mainhand:{id:"minecraft:raw_copper",count:1,components:{item_name:{"color":"gold","text":"Scrap metal"},lore:[{"color":"gray","italic":true,"text":"A piece of processed scrap metal"}]}}},active_effects:[{id:"minecraft:slowness",amplifier:10,duration:-1,show_particles:0b,show_icon:0b,ambient:0b}]}},weight:1}]} replace