BlockAPI::getBlockFace() method optimization to use the Vector3 method

This commit is contained in:
Shoghi Cervantes Pueyo 2013-03-04 16:50:41 +01:00
parent 287fa7e551
commit 354893ba11

View File

@ -101,9 +101,7 @@ class BlockAPI{
}
public function getBlockFace(Block $block, $face){
$data = array("x" => $block->x, "y" => $block->y, "z" => $block->z);
BlockFace::setPosition($data, $face);
return $this->getBlock($data["x"], $data["y"], $data["z"]);
return $this->getBlock($block->getSide($face));
}
function __construct(PocketMinecraftServer $server){