pocketmine\level\Level::chunkBlockHash PHP Method

chunkBlockHash() public static method

public static chunkBlockHash ( integer $x, integer $y, integer $z ) : integer
$x integer
$y integer
$z integer
return integer
    public static function chunkBlockHash(int $x, int $y, int $z) : int
    {
        return $x << 11 | $z << 7 | $y;
    }

Usage Example

 public function setBlockExtraData($x, $y, $z, $data)
 {
     if ($data === 0) {
         unset($this->extraData[Level::chunkBlockHash($x, $y, $z)]);
     } else {
         $this->extraData[Level::chunkBlockHash($x, $y, $z)] = $data;
     }
     $this->setChanged(\true);
 }
Level