Chest: remove pairx and pairz on blockpick, fixes #2612

This commit is contained in:
Dylan K. Taylor 2018-12-26 22:26:17 +00:00
parent 5d47ea4337
commit 98f903783c

View File

@ -70,6 +70,15 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
$this->saveItems($nbt);
}
public function getCleanedNBT() : ?CompoundTag{
$tag = parent::getCleanedNBT();
if($tag !== null){
//TODO: replace this with a purpose flag on writeSaveData()
$tag->removeTag(self::TAG_PAIRX, self::TAG_PAIRZ);
}
return $tag;
}
public function close() : void{
if(!$this->closed){
$this->inventory->removeAllViewers(true);