Cache the climbing check in activation range
This pr aims to reduce the overhead of checking multiple times per tick if an entity is climbing. It does it by caching the last climbing block pos and checking if its the same as the current pos and returning early.
In my testing it helps to reduce the tick time spent on entities and the climbing related logic such as setClimbing now taking 0.02% of the tick time instead of 0.06%
Before: https://spark.lucko.me/cV9CmdEmwJ
After: https://spark.lucko.me/7PDoTbgYhA
Entities on which these sparks were conducted are spiders
note: a version of this patch was also used in forks such as Pufferfish and Airplane and provided great results when paired with huge entity numbers
rebased to .7
rebased for 1.21.9))
rebased this for 1.21.11