For my Forge mod Zyin's HUD I am trying to get a very precise way to find out a horse's max jump height. I did some testing to see exactly what the value "EntityHorse.func_110215_cj()" returns in correlation to the horse's jump height. Here is my testing data:
Snow pieces were used to increase block height by 0.125. If you look closely at the data you'll notice that the trend is not linear, so I ended up trying a quadratic fit for the data but it doesn't work very well for horses in the mid-range of jump strengths.
Does anyone know a function to translate "EntityHorse.func_110215_cj()" to amount of blocks jumped? Or is there a better way to determine this?
I did that but it wasn't completely accurate. I ended up solving this by simulating gravity and air resistance based on the jump strength of the entity. Here's the code:
Snow pieces were used to increase block height by 0.125. If you look closely at the data you'll notice that the trend is not linear, so I ended up trying a quadratic fit for the data but it doesn't work very well for horses in the mid-range of jump strengths.
Does anyone know a function to translate "EntityHorse.func_110215_cj()" to amount of blocks jumped? Or is there a better way to determine this?
I used this set:
0.49262 1.625
0.51358 1.75
0.56227 2
0.91405 5
0.94306 5.25
y = 6.327866259 x2 - 0.967866358 x + .5640754617
With a greatest error of 3.375023868·10-2
Reversing this function gives me some data:
1 block = ~0.34986
2 blocks = ~0.558938
3 blocks = ~0.701617
4 blocks = ~0.817308
5 blocks = ~0.917228
6 blocks = ~1.00647
7 blocks = ~1.08787
8 blocks = ~1.16319
9 blocks = ~1.23362
10 blocks = ~1.3