#How to make player immortal?
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 If nobody has answered you by <t:1731747638:t>, feel free to use the Summon Helpers button to ping our helper team.
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
give them resistance 6 that negates all damage I think
but I need them to be able to get to half heart, not just be full-hearts all the time.
give it to them when they have half a heart?
and what if they just go from 1 heart to 0 hearts?
hmm yea umm
I mean, that would be instant death, no time to apply any effect
Then I don't think it's possible
If you can use an item, you could revive them with a totem and then set their health to 1hp with resistance 5 or bigger
Thanks for the help anyway
I'll wait for some advanced datapacker to come out with something feasible
I thought that too but it's not visually nice
You may also be able to do some tricks with enchantments but I’m not sure
Haven’t done much with them
I don’t think anything else can react to damage before it gets applied
Afaik they trigger instantly after but one could try giving health then, it’s worth a try
That triggers on all damage
really?
then why is it called entity_hurts_player xD
Yeah, really strange - entity_killed_player btw only works if another entity is involved 🤷
even if called instantly, I guess it wouldn't work.
Idk those are things you should try
since the order in which things are done in mojangs code may make it possible
What do you need it for, maybe you need to change your approach
Like - why is using another reason to set them to half a heart or make them invulnerable at full health or something else not feasible
The exact thing you want is either impossible or uses a really unknown mechanic that we can’t think of
datapacks are still limited by what they can do so sometimes there just is no way to make something work (sadly)
but still compared to datapacks before 1.18 the things we can do now are insane
Yeah I know
anyway, I'll stick to the mod implementation for this, I guess that's still the only way
If your question is resolved, that's great to hear! Make sure to run /resolve or click the Resolve Question button. Otherwise, feel free to continue asking for help! :D