Started by
Ro...
on
Topic category: Help with Minecraft modding (Java Edition)
hi, i want to know if its possible to make a food that when u eat, it make u immortal. i dont want to give potion cuz... yeah u know why. and if i give potion effect, it wont stay forever and u can still die. anybody have an idea?
"if i give potion effect, it wont stay forever and u can still die" You can't die if you have the immortality potion.... because you're immortal!
You could make a food item, and when you eat it, it sets to true a NBT tag of the player. The you create a procedure triggered "on player tick" and if the player gets hurt, you cancel the damages if the NBT tag "immortality" is true.
here https://imgur.com/a/G7sIj0g i repeat this alot. https://imgur.com/a/ZKVjw8r . as u can see. its immortality
im immortal
do that or u will crash. https://imgur.com/a/WhyYPXZ . create a potion effect and do that
Instead of reapeting, do it on payer tick
I dont find player tick, and btw, it work thx for ur help, and just one thing, it work but at 90% that mean, if something hit u wont lose health and the potion is infinite so even if u drink milk it wont desappear, the problem is, if u play with a mod that add a strong boss who one shot u, u die, but u respawn at the same place, this is some kind of immortality i guess, cuz u click respawn button and its like ur never diedé