Skip to content
New issue

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

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

Already on GitHub? # to your account

Fixed player splash potions not working and reworked potion dispense behaviour #115

Merged
merged 9 commits into from
Nov 5, 2024

Conversation

mizarc
Copy link
Owner

@mizarc mizarc commented Nov 5, 2024

This was initially just supposed to be a fix of the dispenser flag overextending its protection to players throwing splash potions in claims, but ended up with a bit more than that.

Dispensed potions now disappear if they originated from outside the claim and landed inside the claim. The filtering of hostile mobs and passive mobs still apply if the splash happens outside the claim but affects entities inside the claim. This behaviour is also shared with lingering potions.

Another addition is the protection from witch potions, as witches throwing potions should not be able to affect passive mobs.

Without this check, all splash potions are blocked rather than just the
ones that are thrown by dispensers.
Dispenser splash potion cancelling should only apply when shot out of a
dispenser, and not affect players or witches.
All splashes should be disabled if inside of the claim as the cloud
itself is a form of griefing.
This handles the edge case if the lingering potion cloud is splashed on
the outer edge of a claim, which causes the cloud formation to extend
into the claim. For the non monster entities that would be affected,
they are taken out of the affected list.
This should perform the check like the lingering potions, where if the
potion itself lands inside the claim, it should just be cancelled
entirely and only need to perform the per entity checks if dispensed on
the outer edge of the claim.
This ensures that the check to see if the potion affects the entities
within the claim still works even if no entities are hit.
This is under the mob griefing umbrella where witches should not be able
to affect animals or villagers with potions.
@mizarc mizarc added bug Something isn't working enhancement New feature or request labels Nov 5, 2024
@mizarc mizarc self-assigned this Nov 5, 2024
@mizarc mizarc merged commit 4c38f3f into release/0.3 Nov 5, 2024
1 check passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant