2

Non-functioning datapack but it does validate

marblokreal4/27/25 9:30 am
2 emeralds 111 4
5/3/2025 11:46 am
marblokreal
I tried to make a datapack that lets wardens drop a diamond when killed instead of a shulk shrieker.

It loads, but it doesn't function, wardens still drop shulk shriekers,

here is a download to try it yourself.

If you know wat's wrong, please say it in the comments.
Posted by
marblokreal
Level 9 : Apprentice Miner
1

Create an account or sign in to comment.

4

dreamCritting
04/27/2025 4:09 pm
She/Her • Level 75 : Legendary Modder
Some more clarification on what ScotsMiser mentioned - the folder after the data folder should always be the name/mod id of whatever the content you are changing is from, so it would only be customdrops if you were changing the loot table of an entity called warden from a mod with the id customdrops, also as long as the number is whole it should work fine, so 1.0 will work just as well as 1, and vanilla itself uses values like 1.0 for loot tables.
1
marblokreal
05/03/2025 11:46 am
Level 9 : Apprentice Miner
thanks
2
ScotsMiser
04/27/2025 1:16 pm
Level 61 : High Grandmaster Miner
Based on the pack foramt number of 61, I'm assuming this is for 1.21.4…
As far as I can tell the issue is with the folder structure, you have

PACK;
  data
    customdrops
      loot_table  
        entities
          warden.json
  pack.mcmeta

however,
this leaves the vanilla warden loot table active


PACK;
  data
    minecraft <<-- NOTE
      loot_table  
        entities
          warden.json
  pack.mcmeta

will replace the vanilla version

(You also have "rolls" as 1.0
My impression is that this ought be an integer q.v https://minecraft.wiki/w/Loot_table#Pool . )

Note that this will replace the normal drop (sculk_catalyst) with a diamond.
For the diamond to drop 75% and the catalyst 25% the loot able needs to be:

{
"type": "minecraft:entity",
"pools": [
{
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:diamond",
"weight": 3
},
{
"type": "minecraft:item",
"name": "minecraft:sculk_catalyst"
"weight": 1
}
],
"rolls": 1
}
],
"random_sequence": "minecraft:entities/warden"
}

Please not that I'm doing this "blind" and have not tested the changes
1
marblokreal
05/03/2025 11:46 am
Level 9 : Apprentice Miner
ow,, thanks
2

Welcome