ProjectileHitEntityEvent
extends ProjectileHitEvent
in package
Table of Contents
- MAX_EVENT_CALL_DEPTH = 50
- $entity : Entity
- $eventName : string|null
- $entityHit : Entity
- $eventCallDepth : int
- $rayTraceResult : RayTraceResult
- __construct() : mixed
- call() : void
- Calls event handlers registered for this event.
- getEntity() : Entity
- getEntityHit() : Entity
- Returns the Entity struck by the projectile.
- getEventName() : string
- getRayTraceResult() : RayTraceResult
- Returns a RayTraceResult object containing information such as the exact position struck, the AABB it hit, and the face of the AABB that it hit.
Constants
MAX_EVENT_CALL_DEPTH
private
mixed
MAX_EVENT_CALL_DEPTH
= 50
Properties
$entity
protected
Entity
$entity
Tags
$eventName
protected
string|null
$eventName
= null
$entityHit
private
Entity
$entityHit
$eventCallDepth
private
static int
$eventCallDepth
= 1
$rayTraceResult
private
RayTraceResult
$rayTraceResult
Methods
__construct()
public
__construct(Projectile $entity, RayTraceResult $rayTraceResult, Entity $entityHit) : mixed
Parameters
- $entity : Projectile
- $rayTraceResult : RayTraceResult
- $entityHit : Entity
Return values
mixed —call()
Calls event handlers registered for this event.
public
call() : void
Tags
Return values
void —getEntity()
public
getEntity() : Entity
Tags
Return values
Entity —getEntityHit()
Returns the Entity struck by the projectile.
public
getEntityHit() : Entity
Return values
Entity —getEventName()
public
final getEventName() : string
Return values
string —getRayTraceResult()
Returns a RayTraceResult object containing information such as the exact position struck, the AABB it hit, and the face of the AABB that it hit.
public
getRayTraceResult() : RayTraceResult