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

Fix fluid damage values for BlockFromToEvents #1025

Merged
merged 2 commits into from
Jul 16, 2022

Conversation

OhPointFive
Copy link
Contributor

For some reason, SportPaper (and presumably other papers) use the wrong damage values in the BlockFromToEvents, using the damage value of the originating block instead of the one formed as a result.

This makes it difficult to, for example, make water flow only 3 blocks through a filter, since it'll hang weirdly over edges or stop working entirely sometimes.

We could patch it in sportpaper (although I think it was difficult to do, when I checked) but I suspect other Papers have the same bug, so it's easier to handle it here, instead.

This PR fixes the damage value of these events, so flowing water can be correctly filtered.

For some reason, SportPaper (and presumably other papers)
use the wrong damage values in the BlockFromToEvents,
using the damage value of the originating block
instead of the one formed as a result.

This manually calculates the damage value of the block
that would be formed, and updates the event.

Signed-off-by: OhPointFive <ohpointfive@gmail.com>
Signed-off-by: OhPointFive <ohpointfive@gmail.com>
@Electroid Electroid merged commit 5588b33 into PGMDev:dev Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants