Changed face position floating-point params to Vector3s

This commit is contained in:
Dylan K. Taylor
2017-08-20 10:23:34 +01:00
parent 5b3bed8b06
commit e1d894057c
50 changed files with 96 additions and 75 deletions

View File

@ -27,6 +27,7 @@ use pocketmine\block\Block;
use pocketmine\block\Fire;
use pocketmine\block\Solid;
use pocketmine\level\Level;
use pocketmine\math\Vector3;
use pocketmine\Player;
class FlintSteel extends Tool{
@ -34,7 +35,7 @@ class FlintSteel extends Tool{
parent::__construct(self::FLINT_STEEL, $meta, $count, "Flint and Steel");
}
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
public function onActivate(Level $level, Player $player, Block $block, Block $target, int $face, Vector3 $facePos) : bool{
if($block->getId() === self::AIR and ($target instanceof Solid)){
$level->setBlock($block, Block::get(Block::FIRE), true);
if(($player->gamemode & 0x01) === 0 and $this->useOn($block)){