Immortality fruit

Started by Ro... on

Topic category: Help with Minecraft modding (Java Edition)

Active 19 hours ago
Joined Mar 2020
Points:
1151

User statistics:

  • Modifications: 6
  • Forum topics: 71
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 270
Immortality fruit

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?

Active 6 months ago
Joined Jun 2015
Points:
1273

User statistics:

  • Modifications: 10
  • Forum topics: 32
  • Wiki pages: 0
  • MCreator plugins: 1
  • Comments: 544
"if i give potion effect, it…
Mon, 04/20/2020 - 08:22

"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.

Active 19 hours ago
Joined Mar 2020
Points:
1151

User statistics:

  • Modifications: 6
  • Forum topics: 71
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 270
im immortal
Mon, 04/20/2020 - 20:39

im immortal

Active 6 months ago
Joined Jun 2015
Points:
1273

User statistics:

  • Modifications: 10
  • Forum topics: 32
  • Wiki pages: 0
  • MCreator plugins: 1
  • Comments: 544
Instead of reapeting, do it…
Mon, 04/20/2020 - 22:08

Instead of reapeting, do it on payer tick

Active 19 hours ago
Joined Mar 2020
Points:
1151

User statistics:

  • Modifications: 6
  • Forum topics: 71
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 270
I dont find player tick, and…
Tue, 04/21/2020 - 01:23

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é