mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +00:00
getBlockFace() Level API fix
This commit is contained in:
parent
4e9df899c2
commit
3a0db10d6b
1 changed files with 3 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue