Tile: remove createNBT(), add create(), createFromData(), createFromItem()

This commit is contained in:
Dylan K. Taylor
2018-12-10 19:40:37 +00:00
parent 6dbceda3e8
commit d72e4cb9a1
15 changed files with 105 additions and 95 deletions

View File

@ -69,7 +69,9 @@ class FlowerPot extends Flowable{
}
if(parent::place($item, $blockReplace, $blockClicked, $face, $clickVector, $player)){
Tile::createTile(Tile::FLOWER_POT, $this->getLevel(), TileFlowerPot::createNBT($this, $item));
if(($tile = Tile::createFromItem(Tile::FLOWER_POT, $this->getLevel(), $this->asVector3(), $item)) !== null){
$this->level->addTile($tile);
}
return true;
}