Mobs: a punch shows smooth and slow, as on vanilla's client
The server sends a knocked-back, pushed or jumping mob's move at once (Entity.needsSync), and the remote client walks every living entity along the server's positions with vanilla's SteppedInterpolationHandler: each position takes the type's update interval to reach, sped up while steps pile up. Before, the client waited for the next due update and then lerped there in fewer ticks, so a hit pig jumped away fast. tools/test_stepped_interpolation_parity.py drives vanilla's unmodified InterpolationData and the Rust port with the same packets and ticks (random cases and a punched pig's knockback); 135236 positions and rotations match bit for bit. Fixes #1374 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -832,6 +832,9 @@ impl Mob {
|
||||
};
|
||||
}
|
||||
pub fn jump_from_ground(&mut self, w: &MobWorld) {
|
||||
// LivingEntity.jumpFromGround (and the rabbit's and cubes' own,
|
||||
// which call it or do the same): needsSync.
|
||||
self.needs_sync = true;
|
||||
if self.species() == super::Species::Rabbit {
|
||||
super::rabbit::jump(self, w);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user