mojira.dev
MC-263882

TNT performs raycast check for fall damage

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

[media]

Linked issues

Comments 2

Mind telling where in the code this can be found?
Is TNT the only non-living entity with this check?

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.

cubicmetre

(Unassigned)

Plausible

Platform

Normal

Performance

1.20.1, 1.20.2, 1.21.1, 24w36a

Retrieved