migrate to new CompoundTag API (#1515)

This commit is contained in:
Dylan K. Taylor
2017-11-10 15:38:21 +00:00
committed by GitHub
parent d4494687d1
commit aa399a1109
20 changed files with 305 additions and 370 deletions

View File

@ -77,10 +77,8 @@ class BurningFurnace extends Solid{
$furnace = Tile::createTile(Tile::FURNACE, $this->getLevel(), TileFurnace::createNBT($this));
}
if(isset($furnace->namedtag->Lock) and $furnace->namedtag->Lock instanceof StringTag){
if($furnace->namedtag->Lock->getValue() !== $item->getCustomName()){
return true;
}
if($furnace->namedtag->hasTag("Lock", StringTag::class) and $furnace->namedtag->getString("Lock") !== $item->getCustomName()){
return true;
}
$player->addWindow($furnace->getInventory());