mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-20 10:24:07 +00:00
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:
parent
ea09cc06c7
commit
93443992be
@ -152,8 +152,8 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
|
|||||||
|
|
||||||
$this->createPair($tile);
|
$this->createPair($tile);
|
||||||
|
|
||||||
$this->spawnToAll();
|
$this->onChanged();
|
||||||
$tile->spawnToAll();
|
$tile->onChanged();
|
||||||
$this->checkPairing();
|
$this->checkPairing();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -175,12 +175,12 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
|
|||||||
$tile = $this->getPair();
|
$tile = $this->getPair();
|
||||||
$this->namedtag->removeTag(self::TAG_PAIRX, self::TAG_PAIRZ);
|
$this->namedtag->removeTag(self::TAG_PAIRX, self::TAG_PAIRZ);
|
||||||
|
|
||||||
$this->spawnToAll();
|
$this->onChanged();
|
||||||
|
|
||||||
if($tile instanceof Chest){
|
if($tile instanceof Chest){
|
||||||
$tile->namedtag->removeTag(self::TAG_PAIRX, self::TAG_PAIRZ);
|
$tile->namedtag->removeTag(self::TAG_PAIRX, self::TAG_PAIRZ);
|
||||||
$tile->checkPairing();
|
$tile->checkPairing();
|
||||||
$tile->spawnToAll();
|
$tile->onChanged();
|
||||||
}
|
}
|
||||||
$this->checkPairing();
|
$this->checkPairing();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user