Fixed chests not getting updated properly on pair/unpair, close #1514

it wasn't clearing spawn compound caches or chunk caches
This commit is contained in:
Dylan K. Taylor 2017-10-30 11:50:02 +00:00
parent ea09cc06c7
commit 93443992be

View File

@ -152,8 +152,8 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
$this->createPair($tile);
$this->spawnToAll();
$tile->spawnToAll();
$this->onChanged();
$tile->onChanged();
$this->checkPairing();
return true;
@ -175,12 +175,12 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
$tile = $this->getPair();
$this->namedtag->removeTag(self::TAG_PAIRX, self::TAG_PAIRZ);
$this->spawnToAll();
$this->onChanged();
if($tile instanceof Chest){
$tile->namedtag->removeTag(self::TAG_PAIRX, self::TAG_PAIRZ);
$tile->checkPairing();
$tile->spawnToAll();
$tile->onChanged();
}
$this->checkPairing();