Add a dedicated event for Wind Burst effects

Aperta
#14,483 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Doc94 ci sta già lavorando.

Dal 27/12/2024.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java
Ambito
api

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Java
Stelle
12.8k
Fork
3.6k
Merge medio
3g 7h
PR unite (30g)
19

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PaperMC/Paper

Tutte le issue di PaperMC/Paper

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.