mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-10 15:59:39 +00:00
Block: fixed correct-type tiles getting overwritten
this manifested by crashing the server whenever someone used a furnace.
This commit is contained in:
parent
01255c5368
commit
65ce1a7581
@ -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()));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user