mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-08 02:51:49 +00:00
getBlockFace() Level API fix
This commit is contained in:
parent
4e9df899c2
commit
3a0db10d6b
@ -66,8 +66,8 @@ class LevelAPI{
|
|||||||
return $this->map->map[$X][$Z];
|
return $this->map->map[$X][$Z];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBlockFace($x, $y, $z, $face){
|
public function getBlockFace($block, $face){
|
||||||
$data = array("x" => $x, "y" => $y, "z" => $z);
|
$data = array("x" => $block[2][0], "y" => $block[2][1], "z" => $block[2][2]);
|
||||||
BlockFace::setPosition($data, $face);
|
BlockFace::setPosition($data, $face);
|
||||||
return $this->getBlock($data["x"], $data["y"], $data["z"]);
|
return $this->getBlock($data["x"], $data["y"], $data["z"]);
|
||||||
}
|
}
|
||||||
@ -75,6 +75,7 @@ class LevelAPI{
|
|||||||
public function getBlock($x, $y, $z){
|
public function getBlock($x, $y, $z){
|
||||||
$b = $this->map->getBlock($x, $y, $z);
|
$b = $this->map->getBlock($x, $y, $z);
|
||||||
$b[2] = array($x, $y, $z);
|
$b[2] = array($x, $y, $z);
|
||||||
|
return $b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFloor($x, $z){
|
public function getFloor($x, $z){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user