Added Level->getTileAt()

This commit is contained in:
Dylan K. Taylor
2017-10-30 13:36:42 +00:00
parent 93443992be
commit 91c256f1a9
4 changed files with 23 additions and 7 deletions

View File

@ -136,7 +136,7 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
*/
public function getPair() : ?Chest{
if($this->isPaired()){
$tile = $this->getLevel()->getTile(new Vector3($this->namedtag->getInt(self::TAG_PAIRX), $this->y, $this->namedtag->getInt(self::TAG_PAIRZ)));
$tile = $this->getLevel()->getTileAt($this->namedtag->getInt(self::TAG_PAIRX), $this->y, $this->namedtag->getInt(self::TAG_PAIRZ));
if($tile instanceof Chest){
return $tile;
}