Started by
Fae-Stricken-Fool
on
Topic category: Help with Minecraft modding (Java Edition)
I've been trying to link a custom loot table I've created to suspicious gravel (via adding the Loot table within the element as "ModID:gameplay/archeology/Loot_location" I tried to add this with /give @p suspicious_gravel{BlockEntityTag:{LootTable:"/loot give @a loot modid:gameplay/archaeology/loot_location"}}), although I have had no success. Does anyone Have Any Ideas on How to do this? I feel like it's something very obvious that I'm not understanding.
You can create your own loot table under the Archaeology category with a custom registry name, etc;
But I realized in messing with this that it appears to be possible to attribute any loot table to suspicious gravel/sand, it just only will give 1 item. Doesn't need to necessarily be an archaeology loot table.
In Minecraft 1.21.8, this command worked for me to give suspicious gravel loot: "/data merge block [your desired XYZ coordinates here] {LootTable:"[mod]:archaeology/suspicious_gravel"}" (I made my own suspicious gravel loot table for this, but you can swap it out with whatever you are trying to use), and just make sure the target block is the correct one & other details are correct, etc, etc.
Hope this helps!
And then also I believe that it doesn't actually determine the loot until you try to brush it, so if you set the loot table for it & then save it in a structure without brushing it, when that structure loads, I believe it should be randomized according to the loot table. (But if you brush it, it'll become locked to whatever it chose when you started brushing)