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;
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
The following information can be retrieved from the event:
ZenGetter | ZenSetter | Type |
---|---|---|
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 |
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.