mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Fixed getBlock() performance degradation caused by 781de3efab
, added Level->getBlockAt() to avoid creating vectors everywhere
This commit is contained in:
@ -226,7 +226,7 @@ abstract class Tile extends Position{
|
||||
* @return Block
|
||||
*/
|
||||
public function getBlock() : Block{
|
||||
return $this->level->getBlock($this);
|
||||
return $this->level->getBlockAt($this->x, $this->y, $this->z);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user