Posted August 6, 20169 yr How can you check for the player's health? For An Example: (If Player Health's health equals (Value))
August 7, 20169 yr Author Every living entity has a method called getHealth. For An Example: public static void onUpdate() { if(mc.thePlayer.getHealth() <= 4.5) { Text = "1"; } } Every Time It Just Crashes
August 7, 20169 yr You are getting the client-side only player-instance, when using Minecraft#getMinecraft#thePlayer. That instance, does not exist, for the server. You need to use EntityPlayer#getHealth, to be able to do anything server-side. Also previously known as eAndPi. "Pi, is there a station coming up where we can board your train of thought?" -Kronnn Published Mods: Underworld Handy links: Vic_'s Forge events Own WIP Tutorials.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.