mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Add a hook to enable blocks to react to projectiles colliding with them
this enables implementing blocks such as the target block.
This commit is contained in:
@ -306,5 +306,6 @@ abstract class Projectile extends Entity{
|
||||
*/
|
||||
protected function onHitBlock(Block $blockHit, RayTraceResult $hitResult) : void{
|
||||
$this->blockHit = $blockHit->getPosition()->asVector3();
|
||||
$blockHit->onProjectileHit($this, $hitResult);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user