pls help me add an effect to food

Started by TheDiamondYT on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
pls help me add an effect to food

so im making a mod that adds fugu (the irl edible pufferfish thats really hard to make and it could be deadly if made wrong) and i want to make it so that if you eat it it has a chance of giving you the wither effect for 10 seconds or the regen effect for 10 seconds but idk how. can someone help? thanks!

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sure! There is a trigger…
Tue, 03/31/2026 - 13:26

Sure! There is a trigger called "Player finishes using item". Which triggers a procedure when an item is consumed (example). Then make a random roll and either give the event/target entity with or regeneration for 10 seconds.

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can find the randomizer…
Tue, 03/31/2026 - 13:28

You can find the randomizer in the "numbers" tab. It regenerates a number between 0 and 1 (included) so if you wanna make a 50/50 chance, ask if the random is greater than 0,5.