Better handling of touching_ground for bouncing on beds #4689

Merged
the-real-herowl merged 1 commits from kno10/VoxeLibre:moveresult2 into master 2024-10-27 14:03:51 +01:00
Member

The old approach (introduced by #4547, so not in any released version yet) had two issues:

  1. mobs that touched ground in water would not receive upward float, you could seemingly walk on the ocean floor (at least for one tick, see below), because the method returned too eagerly suggested by the poor method name
  2. when zero gravity is applied, they will not collide with the ground in the next step, and hence lose the flag again the next tick

This approach reduces gravity to 1% when already touching ground, which should still help with bouncy beds, but otherwise does the full processing of floating.

The old approach (introduced by #4547, so not in any released version yet) had two issues: 1. mobs that touched ground in water would not receive upward float, you could seemingly walk on the ocean floor (at least for one tick, see below), because the method returned too eagerly suggested by the poor method name 2. when zero gravity is applied, they will not collide with the ground in the next step, and hence lose the flag again the next tick This approach reduces gravity to 1% when already touching ground, which should still help with bouncy beds, but otherwise does the full processing of floating.
kno10 added this to the 0.88.0 – Back on Track milestone 2024-10-21 20:54:22 +02:00
kno10 added the
bug
#P1 CRITICAL
labels 2024-10-21 20:54:22 +02:00
kno10 added 1 commit 2024-10-21 20:54:24 +02:00
Contributor

Can the tweaks to touching_ground also fix issue #2394? (Mobs don't forget their fall speed)

Can the tweaks to `touching_ground` also fix issue #2394? *(Mobs don't forget their fall speed)*
Author
Member

@kneekoo no, that is slightly different. old_y, which is used to compute the fall height, is not reset correctly.
IMHO the damage should rather depend on the impact speed than the height. E.g., a cobweb could slow down fall, too.

@kneekoo no, that is slightly different. `old_y`, which is used to compute the fall height, is not reset correctly. IMHO the damage should rather depend on the impact speed than the height. E.g., a cobweb could slow down fall, too.

@kno10 I agree.

@kno10 I agree.
the-real-herowl approved these changes 2024-10-27 14:01:19 +01:00
the-real-herowl merged commit e293cbe631 into master 2024-10-27 14:03:51 +01:00
kno10 deleted branch moveresult2 2024-10-27 15:46:26 +01:00
Sign in to join this conversation.
No reviewers
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#4689
No description provided.