Also why are you building a new loot table every time?
Either:
a) build the loot table once and store it in a field
b) don't use a loot table at all and just go "derp, I can ask for a random integer from 0 to 1 and if 1 add a new item stack to the generated loot list." Because the loot table you're building is overkill for what you need.
c) put that loot table stuff in the loot table json file and deserialize the details so datapacks can override it
When you are breaking a block, the "this" entity in the condition is the player, and since the primalmagic:drops_bloody_flesh tag contains the player, the condition is met. You would have to add another condition that checks that an entity was actually killed.
1
point
Important Information
By using this site, you agree to our Terms of Use.