mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
[Bleeding] Add new TargetReasons to EntityTargetEvent.
This commit adds three new TargetReasons to EntityTargetEvent to address missing cases where the event is not currently fired. The first, TargetReason.TARGET_ATTACKED_NEARBY_ENTITY, is used when a neutral wolf is attacked, causing all nearby wolves to turn hostile and attack the first wolf's target. The second, TargetReason.REINFORCEMENT_TARGET, is used when a zombie summons reinforcements and the new zombie targets the first zombie's target. The third, TargetReason.COLLISION, is used when an iron golem collides with a hostile entity, causing it to begin targeting the entity it collided with. By: GJ <gjmcferrin@gmail.com>
This commit is contained in:
parent
413ff265d8
commit
181e1c1fb3
1 changed files with 12 additions and 0 deletions
|
@ -121,6 +121,18 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable {
|
||||||
* When an entity selects a target while defending a village.
|
* When an entity selects a target while defending a village.
|
||||||
*/
|
*/
|
||||||
DEFEND_VILLAGE,
|
DEFEND_VILLAGE,
|
||||||
|
/**
|
||||||
|
* When the target attacks a nearby entity of the same type, so the entity targets it
|
||||||
|
*/
|
||||||
|
TARGET_ATTACKED_NEARBY_ENTITY,
|
||||||
|
/**
|
||||||
|
* When a zombie targeting an entity summons reinforcements, so the reinforcements target the same entity
|
||||||
|
*/
|
||||||
|
REINFORCEMENT_TARGET,
|
||||||
|
/**
|
||||||
|
* When an entity targets another entity after colliding with it.
|
||||||
|
*/
|
||||||
|
COLLISION,
|
||||||
/**
|
/**
|
||||||
* For custom calls to the event.
|
* For custom calls to the event.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue