pocketmine\level\Level::getBlockIdAt PHP Method

getBlockIdAt() public method

Gets the raw block id.
public getBlockIdAt ( integer $x, integer $y, integer $z ) : integer
$x integer
$y integer
$z integer
return integer 0-255
    public function getBlockIdAt(int $x, int $y, int $z) : int
    {
        return $this->getChunk($x >> 4, $z >> 4, true)->getBlockId($x & 0xf, $y & 0x7f, $z & 0xf);
    }

Usage Example

コード例 #1
0
ファイル: ChestGuard.php プロジェクト: nesgohood/PMMP-Plugins
 public function sideCheck($x, $y, $z, Level $level, $name)
 {
     if ($level->getBlockIdAt($x, $y, $z) == Block::CHEST) {
         if (isset($this->configData["{$x}:{$y}:{$z}"])) {
             if ($this->configData["{$x}:{$y}:{$z}"] != $name) {
                 return true;
             }
         }
     }
     return false;
 }
All Usage Examples Of pocketmine\level\Level::getBlockIdAt
Level