Topic category: Help with modding (Java Edition)
How can I make a procedure or a actually coding that can avoid the player die in any circumstances? Instead of dying they stop at half heart
My objective is to make a mod where the player get a effect potion when reaching half heart and get immortal while a custom potion effect still running for 20 seconds, the player get blinded, glowed slowed and weaked, if the player use a specific item he regains his hp
It's designed to be a simples knock-out mod
Sadly I don't know how to recognize when the player get half heart and how to make him immortal while with the effect, also, no one knows if Minecraft or another mod gonna have a giga damage and just hit kill the player, I want to make the player stay alive with exactly half heart, avoiding any type of hit kill dmg
Also how I can make a procedure to "when player reach this number of hp"
First post btw, sorry if anything got wrong here.