Started by
e1sh7
on
Topic category: Help with MCreator software
I was trying to create a potion effect that when you drink you burn in the sunlight but unfortunately it works at night I tried a lot of things but nothing seems to work and when the player gets the effect and gets into water the effect doesn't work anymore
Edited by e1sh7 on Sun, 03/23/2025 - 12:15
https://imgur.com/a/JuOnEOf
im using ver. 2025.1
Create a potion affect, make a procedure for it with the "on affect active tick" trigger.
Check if the current world time is equal to or greater than 0, and if it's equal to or less than 12,000. Daytime in Minecraft lasts from 0 to 12,000 ticks. By checking if the current world time falls within this range, it ensures that the player only burns when it's daytime. Also check if the player is not in water.
If those three things are true, do set event/target entity on fire for one second.
https://imgur.com/a/udneVk5
Now create the potion. Under the effects list, add a new effect entry and set it to your custom effect.
thank you so much it finally worked
but can u tell me how to make it that if the player is under a block he doesn't burn bc i can't find the procedure block anywhere
and i want it to stop burning when in nether or end
To prevent the player from burning in other dimensions, verify whether the player's current dimension ID matches 'surface'.
To check if the player is under a block, use the "can location at x,y,z see the sky" block, and replace x, y, and z with the player's current position.
Incorporate these checks alongside the existing three, and it should function as you intended.
.ptpl file: https://www.mediafire.com/file/7l5tqpcwfdmszc0/BurnInSunlightPotion.ptpl/file
Bro You are the goat thank you so much