How do I make an item have only a 8% chance of droping?

Started by Herobrine on

Topic category: Help with modding (Java Edition)

Last seen on 04:40, 6. Jul 2022
Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make an item have only a 8% chance of droping?

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?

Last seen on 17:59, 7. Jan 2024
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make it so there are 2 items…
Sun, 01/03/2021 - 18:26

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.

 

Last seen on 12:02, 20. Mar 2024
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can actually do any item…
Sat, 09/02/2023 - 14:44

You can actually do any item and set the maximum count to 0 so it just doesn't drop anything

Last seen on 15:21, 16. Oct 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Item chance to drop depends…
Sat, 09/02/2023 - 15:59

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.