Started by
Kozzy.
on
Topic category: Help with Minecraft modding (Java Edition)
So, minecraft added this brush thing that let you brush some blocks to find items inside it.
And i want to to do a ancient rune fragment chance for dropping from it, but for doing it i need to know how to make something drop when i finish using the brush on the block (or if i keep brushing it for more than 40 ticks).
If someone could make a template procedure for me with the solution and explain what the procedure does in pieces would be really good :3
(sorry for my english, i dont speak very well)
Edited by Kozzy. on Wed, 01/03/2024 - 00:56
If you want suspicious sand, or suspicious gravel to drop your custom block, you can replace the vanilla archeology loot table with your own. (You would need to make a new loot table with an identical name to the original archeology loot table- but this will replace the entire loot table, not just one item.) The names of these loot tables are:
...To save time, you could also lock your loot table, and then copy and paste the vanilla loot table in, plus the one item you want to add.
If you want to make your own custom block that behaves the same as suspicious sand or suspicious gravel, it will be more difficult, but not impossible. You will need multiple textures, along with multiple blockstates, and some sort of variable or nbt tag to keep track of how close the block is to finished.
yeah thats what i want, btw how i paste a vanilla loot table on my loot table?
All you have to do is name the loot table the same as the vanilla loot table, and it will override it. If you don't want to also make the rest of the original loot table, you could save time by locking the mod element, going to MCAsset, copying the vanilla loot table you want to override, and pasting all of the other code into there in addition to the item you added.
But if you don't want to mess with raw code, you can also just use the vanilla loot table as a reference and rebuild a new loot table, including the vanilla items alongside your own.
thank you!