added some nullable and void typehints to Block API

This commit is contained in:
Dylan K. Taylor
2017-10-11 18:32:53 +01:00
parent 8f0ee84277
commit d8b1757ebc
36 changed files with 53 additions and 48 deletions

View File

@ -26,6 +26,7 @@ namespace pocketmine\block;
use pocketmine\entity\Entity;
use pocketmine\item\Item;
use pocketmine\level\Level;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Vector3;
abstract class Liquid extends Transparent{
@ -171,7 +172,7 @@ abstract class Liquid extends Transparent{
return $vector->normalize();
}
public function addVelocityToEntity(Entity $entity, Vector3 $vector){
public function addVelocityToEntity(Entity $entity, Vector3 $vector) : void{
$flow = $this->getFlowVector();
$vector->x += $flow->x;
$vector->y += $flow->y;
@ -444,7 +445,7 @@ abstract class Liquid extends Transparent{
}
}
protected function recalculateBoundingBox(){
protected function recalculateBoundingBox() : ?AxisAlignedBB{
return null;
}