Fixed getBlock() performance degradation caused by 781de3efab, added Level->getBlockAt() to avoid creating vectors everywhere

This commit is contained in:
Dylan K. Taylor
2017-10-20 13:22:49 +01:00
parent 98cfd0b398
commit 18e4e5364f
10 changed files with 88 additions and 69 deletions

View File

@ -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);
}
/**