mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Add getBlockFace method to Level API and BlockFace class
This commit is contained in:
parent
145d0707e6
commit
28048db141
2 changed files with 44 additions and 3 deletions
|
|
@ -66,8 +66,15 @@ class LevelAPI{
|
|||
return $this->map->map[$X][$Z];
|
||||
}
|
||||
|
||||
public function getBlockFace($x, $y, $z, $face){
|
||||
$data = array("x" => $x, "y" => $y, "z" => $z);
|
||||
BlockFace::setPosition($data, $face);
|
||||
return $this->getBlock($data["x"], $data["y"], $data["z"]);
|
||||
}
|
||||
|
||||
public function getBlock($x, $y, $z){
|
||||
return $this->map->getBlock($x, $y, $z);
|
||||
$b = $this->map->getBlock($x, $y, $z);
|
||||
$b[2] = array($x, $y, $z);
|
||||
}
|
||||
|
||||
public function getFloor($x, $z){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue