From 65ce1a75810b89f1e692facbcf76fff4841fe7c7 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 15 Feb 2019 13:37:57 +0000 Subject: [PATCH] Block: fixed correct-type tiles getting overwritten this manifested by crashing the server whenever someone used a furnace. --- src/pocketmine/block/Block.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/block/Block.php b/src/pocketmine/block/Block.php index e290d6c4f..4a8dff988 100644 --- a/src/pocketmine/block/Block.php +++ b/src/pocketmine/block/Block.php @@ -189,8 +189,9 @@ class Block extends Position implements BlockIds, Metadatable{ $oldTile = $this->level->getTile($this); if($oldTile !== null and ($tileType === null or !($oldTile instanceof $tileType))){ $oldTile->close(); + $oldTile = null; } - if($tileType !== null){ + if($oldTile === null and $tileType !== null){ $this->level->addTile(TileFactory::create($tileType, $this->level, $this->asVector3())); } }