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

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