Started by
Herobrine
on
Topic category: Help with Minecraft modding (Java Edition)
When im making a loot table and I say an items entry weight to 8 the mob drops it every time I kill it.
So how do I make a mob have only an 8% chance of droping an item?
Make it so there are 2 items
1 has a weight of 2, and the other a weight of 23
make the weight of 2 your 8% drop chance, and the other something random like coal or a self-deleting item.
You can actually do any item and set the maximum count to 0 so it just doesn't drop anything
Item chance to drop depends on weight through formula:
(entry weight) / (total weight from all entries in pool)
So for your item to drop with 8% chance, you'd have to make sure that your item's weight to total weight's ratio is 8/100.
So like said by someone above, pick for your item 2 and make another entry with weight 23 and pick to drop air or a self deleting item.
Im facing the same issue, and it seems to be completely broken anyway- I have a two blocks high plant that's supposed to drop 3 items on random, one most common, one less common, one least common - I added 3 entries with air and weight of 20, the most common item has a weight of 12, the less common one has a weight of 4, and the least common one has a weight of 1 (I set max count 1 and min count 0 for all of them). The least common one drops the most somehow and sometimes more than 1 drops for all the items. Idrk how to fix this, been sitting here for at least half an hour
nvm I just fixed it kekw