9
0
mirror of https://github.com/SparklyPower/SparklyPaper.git synced 2025-12-23 08:59:19 +00:00
Commit Graph

1 Commits

Author SHA1 Message Date
MrPowerGamerBR
5d46676859 Skip "distanceToSqr" call in "ServerEntity#sendChanges" if the delta movement hasn't changed
The "distanceToSqr" call is a bit expensive, so avoiding it is pretty nice, around ~15% calls are skipped with this check

We could also check if the x,y,z coordinates are equal, but for now, let's just keep the identity check, which also helps us since Minecraft's code does reuse the original delta movement Vec3 object
2023-11-15 23:59:00 -03:00