PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\level\MovingObjectPosition Class Reference
+ Collaboration diagram for pocketmine\level\MovingObjectPosition:

Static Public Member Functions

static fromBlock ($x, $y, $z, $side, Vector3 $hitVector)
 
static fromEntity (Entity $entity)
 

Public Attributes

 $typeOfHit
 
 $blockX
 
 $blockY
 
 $blockZ
 
 $sideHit
 
 $hitVector
 
 $entityHit = null
 

Detailed Description

Definition at line 27 of file MovingObjectPosition.php.

Member Function Documentation

static pocketmine\level\MovingObjectPosition::fromBlock (   $x,
  $y,
  $z,
  $side,
Vector3  $hitVector 
)
static
Parameters
int$x
int$y
int$z
int$side
Vector3$hitVector
Returns
MovingObjectPosition

Definition at line 61 of file MovingObjectPosition.php.

static pocketmine\level\MovingObjectPosition::fromEntity ( Entity  $entity)
static
Parameters
Entity$entity
Returns
MovingObjectPosition

Definition at line 76 of file MovingObjectPosition.php.

Referenced by pocketmine\entity\Projectile\onUpdate().

+ Here is the caller graph for this function:

Member Data Documentation

pocketmine\level\MovingObjectPosition::$sideHit

Which side was hit. If its -1 then it went the full length of the ray trace. Bottom = 0, Top = 1, East = 2, West = 3, North = 4, South = 5.

Definition at line 40 of file MovingObjectPosition.php.

pocketmine\level\MovingObjectPosition::$typeOfHit

0 = block, 1 = entity

Definition at line 30 of file MovingObjectPosition.php.


The documentation for this class was generated from the following file: