ProjectileImpactArrow

Link to projectileimpactarrow

This event is fired whenever an arrow projectile impacts an entity but before damage, etc, is calculated. It is cancelable, and if canceled, the impact will not be processed.

Various values from the arrow entity are available through zengetters, and can be modified in order to adjust damage, knockback strength, pickup status, and determine (or force) a critical hit.

Импорт класса

Link to импорт-класса

It might be required to import the class to avoid errors.
import crafttweaker.event.ProjectileImpactArrowEvent;

Extending IEntityEvent

Link to extending-ientityevent

ProjectileImpactArrow Events implement the following interfaces and are able to call all of their methods/getters/setters as well:

ZenGetters and ZenSetters

Link to zengetters-and-zensetters

Следующая информация может быть получена от события:

ZenGetterZenSetterТип
ZenGetter
arrow
ZenSetter
Тип
IEntity
ZenGetter
shooter
ZenSetter
Тип
IEntity
ZenGetter
damage
ZenSetter
damage
Тип
double
ZenGetter
ZenSetter
knockbackStrength
Тип
int (setter only, no getter)
ZenGetter
isCritical
ZenSetter
isCritical
Тип
boolean
ZenGetter
pickupStatus
ZenSetter
Тип
String

Additional methods

Link to additional-methods

  • setPickupDisallowed()

Prevents the arrow from being picked up under any circumstances.

  • setPickupAllowed()

Allows the arrow to be picked up from where the entity landed.

  • setPickupCreative()

Only allows the arrow to be picked up if the player is in creative mode.