small tweaks

This commit is contained in:
GameHerobrine 2023-01-22 17:25:23 +03:00
parent c41e31e237
commit 9f5304bdad
7 changed files with 52 additions and 47 deletions

View file

@ -456,12 +456,13 @@ class Level{
* @param number $x
* @param number $y
* @param number $z
* @param boolean $positionfy assign coordinates to block or not
* @return GenericBlock | false if failed
*/
public function getBlockWithoutVector($x, $y, $z){
public function getBlockWithoutVector($x, $y, $z, $positionfy = true){
$b = $this->level->getBlock($x, $y, $z);
return BlockAPI::get($b[0], $b[1], new Position($x, $y, $z, $this));
return BlockAPI::get($b[0], $b[1], $positionfy ? new Position($x, $y, $z, $this) : false);
}
/**