mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 18:05:10 +00:00
Fix mount movement jitter by following vanilla horse/boat sync pattern
- Remove all velocityChanged=true flags from mount movement code (NPCMountUtil, EntityNPCInterface, EntityNPCFlying) - Make performMountedMovement physics server-side only like vanilla horse - Remove syncMountedRiderVelocity method that forced rider velocity packets - Fix ground movement to not reset motionY every tick - Let Minecraft's entity tracker handle position sync naturally The jitter was caused by S12PacketEntityVelocity being sent every tick, which constantly reset client interpolation. Vanilla horses/boats never set velocityChanged and rely on the entity tracker for smooth sync.
This commit is contained in:
3 files changed
+11
-96
No files matched your search
@@ -84,7 +84,6 @@ public abstract class EntityNPCFlying extends EntityNPCInterface {
|
||||
}
|
||||
|
||||
this.updateLimbSwing();
|
||||
this.velocityChanged = true;
|
||||
}
|
||||
|
||||
public void updateLimbSwing() {
|
||||
@@ -136,7 +135,6 @@ public abstract class EntityNPCFlying extends EntityNPCInterface {
|
||||
|
||||
if (flightModeActive) {
|
||||
super.performMountedMovement(strafe, forward, moveSpeed);
|
||||
this.velocityChanged = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -149,6 +147,5 @@ public abstract class EntityNPCFlying extends EntityNPCInterface {
|
||||
}
|
||||
|
||||
this.updateLimbSwing();
|
||||
this.velocityChanged = true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user