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(Explosion): don't apply motion if the event's cancelled #6403

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

Conversation

cooldogedev
Copy link
Contributor

No description provided.

@dries-c
Copy link
Member

dries-c commented Jul 17, 2024

I remember suggesting this ages ago. The reason this never got through because technically motion isn't related to damage, so it can't fall under this event.

@Matze997
Copy link

New event: EntityExplosionMotionEvent haha

@IvanCraft623
Copy link
Member

vanilla also applies motion even if the damage has been cancelled

@Matze997
Copy link

But isn't the goal of pocketmine to customise the game by changing certain behaviours?

@IvanCraft623
Copy link
Member

But isn't the goal of pocketmine to customise the game by changing certain behaviours?

Yes, but specifically this customization should not be done through EntityDamageEvent.

@ShockedPlot7560
Copy link
Member

The aim is not to introduce behaviors that don't fit in with the api and the gameplay either

@IvanCraft623 IvanCraft623 added the Category: Gameplay Related to Minecraft gameplay experience label Aug 8, 2024
@IvanCraft623
Copy link
Member

EntityDamageByEntityEvent has a knockback property that is not being used for explosions, we could standardize the use of a knockback property in EntityDamageEvent that defaults to zero and take use of the property for explosions. So in this way we could cancel motion of explosions.

I'm pretty sure there was an issue proposing to move knockback property to EntityDamageEvent, I just couldn't find it.

@dktapps
Copy link
Member

dktapps commented Nov 10, 2024

Not really possible to knockback on base EntityDamageEvent since it doesn't have a source to knockback away from. It's possible it could be supported from EntityDamageByBlockEvent. However using existing knockback event APIs in general is a bit problematic because explosion knockback works differently than combat knockback.

@dktapps dktapps added Type: Enhancement Contributes features or other improvements to PocketMine-MP Status: Blocked Depends on other changes which are yet to be completed labels Nov 14, 2024
@dktapps dktapps requested a review from a team as a code owner December 12, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Gameplay Related to Minecraft gameplay experience Status: Blocked Depends on other changes which are yet to be completed Type: Enhancement Contributes features or other improvements to PocketMine-MP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants