Started by
TheDiamondYT
on
Topic category: Help with Minecraft modding (Java Edition)
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!
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.
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.