Well, it turns out, this will be a simpler fix than you guys would think. All one has to do is just look at the EntityPlayer class logically. When the fallDistance float is initialized, it is not public (at least I don't think so), so you must create a public instance of the float within your file. Simply add this line to the top of your mod class:
That grabs a public instance of the float. Now, you can just use the same float to negate the fall damage as you've already known how to do:
And that's it! Thanks for reading this, and if you have any trouble, feel free to PM me. Happy modding! (And Merry Christmas!)
public float fallDistance;
That grabs a public instance of the float. Now, you can just use the same float to negate the fall damage as you've already known how to do:
player.fallDistance = 0.0F;
And that's it! Thanks for reading this, and if you have any trouble, feel free to PM me. Happy modding! (And Merry Christmas!)
Create an account or sign in to comment.