ProjectileHitBlockEvent
        
        extends ProjectileHitEvent
    
    
            
            in package
            
        
    
    
    
        
        
Table of Contents
- MAX_EVENT_CALL_DEPTH = 50
- $entity : Entity
- $eventName : string|null
- $blockHit : Block
- $eventCallDepth : int
- $rayTraceResult : RayTraceResult
- __construct() : mixed
- call() : void
- Calls event handlers registered for this event.
- getBlockHit() : Block
- Returns the Block struck by the projectile.
- getEntity() : Entity
- 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
    
    
    
$blockHit
    private
        Block
    $blockHit
    
    
    
    
$eventCallDepth
    private
    static    int
    $eventCallDepth
     = 1
    
    
    
$rayTraceResult
    private
        RayTraceResult
    $rayTraceResult
    
    
    
    
Methods
__construct()
    public
                    __construct(Projectile $entity, RayTraceResult $rayTraceResult, Block $blockHit) : mixed
        
        Parameters
- $entity : Projectile
- $rayTraceResult : RayTraceResult
- $blockHit : Block
Return values
mixed —call()
Calls event handlers registered for this event.
    public
                    call() : void
    
    
    
    Tags
Return values
void —getBlockHit()
Returns the Block struck by the projectile.
    public
                    getBlockHit() : Block
        Hint: to get the block face hit, look at the RayTraceResult.
Return values
Block —getEntity()
    public
                    getEntity() : Entity
    
    
    
    Tags
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