Hey, i havent made mods in minecraft before and im currently starting out with trying to make some small simple mods.
Im currently trying to make a mod that checks when youre below a certain hp value and then gives you slowness or another potion effect.
I tried searching on google how to get the value from the player health as a int/var to use in a if sentence.
If anyone knows how to do this please respond! :)
Not sure if it helps, but I think there is a thing like (int) in front of the player.getHealth() like this
int playerhealth = (int) player.getHealth();
In reply to hendrick020301:I think it's like
or something similar, it'll return a health amount (I believe it's a double or float)