Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Knockback in water no less #26

Open
AutoComplete1 opened this issue Feb 14, 2023 · 6 comments
Open

Knockback in water no less #26

AutoComplete1 opened this issue Feb 14, 2023 · 6 comments

Comments

@AutoComplete1
Copy link

Players get exactly the same knockback in water as if the water is not there. In Vanilla the player gets less knockback in the water

@TogAr2
Copy link
Owner

TogAr2 commented May 6, 2024

Did you test this with actual players (and not just fakeplayers or any other entity whose movement is controlled server side)? Minestom physics does not have support for water, which would explain the issue

@TogAr2
Copy link
Owner

TogAr2 commented May 6, 2024

I did some testing today and it seems the knockback in water should be different because the gravity & physics in water is different, but this is not the case in Minestom.
Am I right to assume there is no difference for strong (while sprinting) attacks in water? There shouldn't be because the velocity is sent instantly for those

@TogAr2
Copy link
Owner

TogAr2 commented May 6, 2024

Implementing water physics is going to be quite difficult and out of scope for this project, even though I do think Minestom should support them. I'll try to incorporate some of it in MinestomFluids

@emortaldev
Copy link

water physics will be handled on the client, I think you should just check if the player landed on slime blocks or hay bales, then check if the player landed in water or a ladder/vine
this is how I did it on my fork of minestompvp (now gone)

@TogAr2
Copy link
Owner

TogAr2 commented May 7, 2024

water physics will be handled on the client

The problem is that this is not completely the case. The vanilla server applies a physics tick before sending the velocity out to the player, which I replicated in MinestomPvP.

I am unaware (and also can't find in the vanilla source) of any differences in the knockback applied when the player is in water or on slime blocks, hay bales, beds.

I will solve this problem by eventually adding support for water physics, though it's not a high priority.

@emortaldev
Copy link

oh, my bad, i thought this was about fall damage 💀

I will create another issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants