r/MinecraftCommands • u/commensally • 3d ago
Help | Java 26.3 Silk touch spawners + loot tables
Can anyone explain to me in small words why using match_tool in a loot table doesn't seem to work on spawners?
I'm trying to make a (theoretically, though probably not actually) simple java datapack for 26.3 that lets you break spawners to get mob loot. But I am also extremely beginner level with datapacks, so when my first try didn't work I just tried copying over the loot table for stone to spawners to edit that, and that worked fine - except that it always dropped stone whether I used a silk touch tool or not.
I tried swapping in the melon loot table instead of stone, and it did the same thing - whole melons every time I broke a spawner. The enchants work fine on stone and melon blocks with the exact same loot tables! And if I took out the match_tool conditions, everything worked as expected with the spawner, too, it's just once it tried to check for silk touch on a spawner it acted like every pick was silk touch.
I assumed this was just me not knowing what the heck I was doing but I did some poking around on Reddit and Modrinth, and it looks like everybody else's "use silk touch on spawners" datapacks are broken this way too, unless they do something fancy with functions instead of just using the loot table. But I didn't see anyone explaining why.
So - is there something special about how some blocks' loot tables use conditions? Or is it just a bug with spawners? Is it something I will need to worry about if I want to use other conditions/predicates on spawner loot that work on other blocks? Am I just useless? pls help.
2
u/GalSergey Datapack Experienced 3d ago
1
u/GatKong 3d ago
Not being able to collect spawners is hardcoded. Even work-arounds have to get creative to make it happen.