Started by
Cuddly
on
Topic category: Help with Minecraft modding (Java Edition)
How would i make it so there is like a 10% chance that a modded item drops when u kill a vanilla mob?
Topic category: Help with Minecraft modding (Java Edition)
How would i make it so there is like a 10% chance that a modded item drops when u kill a vanilla mob?
I think using the loot Table feature.
where would i find that?
No need for loot tables. Simply use a procedure.
Start with the "When entity killed" global trigger. Then, as the condition for an 'if' statement, put "[Random (0,1]] ≤ 0.1]". This creates your 1/10 chance.
Next, add an "AND" block to your 'if' statement. Add your random 1/10 chance to one of its slots. In the other, add the block "is [event/target entity] (sub)type of [ ]" and set the entity to the vanilla entity you want to use.
Within the 'if' statement, add the block "spawn item or gem at x: y: z: pickup delay [ ] despawn [ ]". Replace the item with whatever you want to use.
This should cause the item you want to appear whenever the entity in question dies.