Started by
giz_Apex
on
Topic category: Help with Minecraft modding (Java Edition)
I'm facing an issue with my loot table. Here is it, this is supposed to work but when I'm in game it still drop vanilla loot for no reason. I tried with procedure and it worked when we break the leaves but whenever they decay, it doesn't work anymore...
I've search all over the forum and didn't found anything.
Thanks in advance
If you have the registry name correct, it's possible the loot table is in the wrong folder for some reason. I had a similar issue with certain recipe overrides being put in the mod data file instead of the minecraft data file. (And therefore not working.) You could check using the built in file explorer in the left tab of the workspace, or by manually looking in the mod's src folder. The data folder should contain a separate file for minecraft and your mod's data, and you need your recipe to be in the minecraft folder for the override to work- MCreator normally does this automatically, but it's for some reason inconsistent at times.
...And of course if that fails, you could also just forget it and make a procedure that has a chance of dropping the item whenever the block is broken. It'll amount to the same thing, even if it's not the most elegant solution...
Just checked and it seems like it's not in the wrong folder (I guess). I'll probably do it with a procedure for when a leave is brocken but I don't know how to do a procedure when the leave block decay/ rot.
I think leaves may have special loot tables for this very reason- they need to have different pools depending on whether the block is mined with shears, whether it decays, etc; not necessarily just silk touch. Here's the vanilla azalea-leaves loot table for reference, not sure what to make of it:
This doesn't really helped me... I still changed the code with yours and my modifications without sucess. I guess the only solution is to make a procedure to detect when a leaf decay and drop a gem with a certain probability, but I don't know how to do this... If you or someone else could help me wit this I would be really grateful.
That's the trouble- I don't know if there is a way to detect when leaf blocks decay, unless you've custom coded the leaf behavior yourself for a modded block. Microsoft has some basic documentation on loot tables, maybe that'll help?
Yeah... This is for bedrock edition, this doesn't help me much. I'll try with procedures then, I'll keep you posted and thanks again for trying to help me.
It is for bedrock, but for some reason most of the syntax is the same. You could also try finding an existing datapack that edits leaf loot tables, just to see how they did it. Anyways, good luck!