If a TnT entity has -y motion, it will perform a raycast on movement which is usually utilised for entities to calculate their accumulated fall damage, however this check is not necessary for TnT which is unaffected by fall damage. This raycast produces severe performance issues in TnT projectiles travelling at high speeds as the raycast will be projected over a very long distance for each tick the TnT moves despite achieving nothing.
The relevant code can be found in Entity.java
Linked issues
Comments 3
this can be found in entity.class in the code and its a thing for every entity that uses regular move method. This was also something that wasnt added into code until 1.18 and leads to huge lag when moving entities at high speeds.
Mind telling where in the code this can be found?
Is TNT the only non-living entity with this check?