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.

Importing the class

Link to importing-the-class

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

Event interface extensions

Link to event-interface-extensions

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

ZenGetters/ZenSetters

Link to zengetterszensetters

The following information can be retrieved from the event:

ZenGetterZenSetterType
ZenGetter
arrow
ZenSetter
Type
IEntity
ZenGetter
shooter
ZenSetter
Type
IEntity
ZenGetter
damage
ZenSetter
damage
Type
double
ZenGetter
ZenSetter
knockbackStrength
Type
int (setter only, no getter)
ZenGetter
isCritical
ZenSetter
isCritical
Type
boolean
ZenGetter
pickupStatus
ZenSetter
Type
String
  • 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.

ZenGetters/ZenSetters/ZenMethods from extensions

Link to zengetterszensetterszenmethods-from-extensions

The following information can be retrieved/set during the event:

ZenGetterZenSetterType
ZenGetter
canceled
ZenSetter
canceled
Type
bool
ZenGetter
rayTrace
ZenSetter
Type
IRayTraceResult

ZenMethods

  • event.cancel(); Method, returns void (nothing). Can cancel the event and stop something from happening

Extensions from extensions

Link to extensions-from-extensions

The following information can be retrieved from the event:

ZenGetterZenSetterType
ZenGetter
entity
ZenSetter
Type
IEntity