Add a dedicated event for Wind Burst effects

Open
#14,483 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Doc94 is already working on this.

Since Dec 27, 2024.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
12/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
api

Research direction

The payload names no files. Start from the existing EntityAttemptSmashAttackEvent and EntityPushedByEntityAttackEvent in the Paper API, and check how Wind Burst's knockback is currently triggered and whether it has a player source. The design is not settled: the event's fields, whether it can cancel the whole effect, and how it relates to the existing events all need a maintainer decision first. Done means an agreed event shape, with the event firing when Wind Burst triggers and tests showing it can be cancelled.

Written by the indexing model from the issue text.

Description

status: accepted
Is your feature request related to a problem?

When a player attacks a block-containing Sulfur Cube with a mace, the Sulfur Cube is immune to damage, so EntityDamageByEntityEvent is not triggered. However, the mace attack can still trigger Smash Attacks and the Wind Burst enchantment.

Although EntityAttemptSmashAttackEvent allows plugins to deny the Smash Attack using Result.DENY, this does not prevent the Wind Burst effect from activating.

Additionally, now Wind Burst appears to have a player source and can trigger EntityPushedByEntityAttackEvent. However, even when this event is cancelled, Wind Burst can still apply knockback to nearby entities within a limited range.

Describe the solution you'd like.

I would like Paper to introduce a dedicated EntityWindBurstEvent that is fired whenever the Wind Burst enchantment is triggered.

The event should provide:

Access to the player or entity that triggered Wind Burst.

Access to the original target of the mace attack.

Access to entities affected by the Wind Burst effect.

The ability to modify or cancel the resulting knockback.

The ability to cancel the entire Wind Burst effect, preventing it from affecting nearby entities.

This would allow protection plugins to properly identify the source of Wind Burst and enforce region protection rules consistently, without relying on indirect knockback events or temporary tracking mechanisms.

Describe alternatives you've considered.

Perhaps allowing left-click attacks against block-holding Sulfur Cubes to still trigger EntityDamageByEntityEvent could solve this issue?

Other

No response

Dominant language
Java
Stars
12.8k
Forks
3.6k
Avg merge
3d 7h
Merged PRs (30d)
19

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PaperMC/Paper

All issues in PaperMC/Paper

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.