mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
BlockAPI::getBlockFace() method optimization to use the Vector3 method
This commit is contained in:
parent
287fa7e551
commit
354893ba11
@ -101,9 +101,7 @@ class BlockAPI{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getBlockFace(Block $block, $face){
|
public function getBlockFace(Block $block, $face){
|
||||||
$data = array("x" => $block->x, "y" => $block->y, "z" => $block->z);
|
return $this->getBlock($block->getSide($face));
|
||||||
BlockFace::setPosition($data, $face);
|
|
||||||
return $this->getBlock($data["x"], $data["y"], $data["z"]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function __construct(PocketMinecraftServer $server){
|
function __construct(PocketMinecraftServer $server){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user