Incorrect entity position during tick freeze
Fallen-Breath opened this issue ยท 0 comments
To Reproduce
- Join single player
- Make a rail line and place a minecart and let it move
/tick freeze
- Teleport to the minecart with
/tp
command - Observe the position you have been teleported to, and the position of the minecart entity rendered in your client
What should happen: You are teleported to the exact same position of the minecart
What happen actually: You are teleported to a position ahead of the minecart on its moving direction. The minecart is not rendered at the same position as it really is in the server
The position incorrection behavior affects all kinds of minecart, boat and LivingEntity
. For example creeper entity is affected, but item entity is not.
Resulting with different environments:
MC version | Fabric carpet version | SP/MP | Entity position during tick freeze |
---|---|---|---|
1.15.2 | 1.4.8 | single player | incorrect |
1.15.2 | 1.4.8 | multi player | correct |
1.19 | 1.4.79 | single player | incorrect |
1.19 | 1.4.79 | multi player | incorrect |
Analyze
During tick freeze, entities ticking in the client world is also frozen. resulting in their position interpolation logic in their tick
method are skipped, resulting their positions stay at the previous pos of the interpolation
The tick freeze status is stored in TickSpeed
class, and the codes to sync the server's TickSpeed
status to the client is introduced in fabric carpet 1.4.22 (mc1.16.4, commit 33347ba) and that should be the reason why the incorrect behavior doesn't happen in 1.15.2 multi player