How to do food RNG

Started by zeez on

Topic category: Help with modding (Java Edition)

Last seen on 02:34, 18. Apr 2023
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to do food RNG

Does anyone know how to make it so when i eat my custom food it has a chance of doing certain things, like 10% chance of givnig poison and a 90% chance of givning regeneration 

Last seen on 16:33, 13. Mar 2023
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
use random number between 1…
Tue, 02/28/2023 - 14:56

use random number between 1 and 10

if it will chose 1 give poison if not regen