Create sign tile like it should be.

This commit is contained in:
thebigsmileXD
2016-06-08 13:18:11 +02:00
committed by Dylan K. Taylor
parent 5f8dc5829c
commit 900c4adb66
2 changed files with 35 additions and 39 deletions

View File

@ -1759,31 +1759,6 @@ class Level implements ChunkManager, Metadatable{
return false;
}
if($hand->getId() === Item::SIGN_POST or $hand->getId() === Item::WALL_SIGN){
$nbt = new CompoundTag("", [
"id" => new StringTag("id", Tile::SIGN),
"x" => new IntTag("x", $block->x),
"y" => new IntTag("y", $block->y),
"z" => new IntTag("z", $block->z),
"Text1" => new StringTag("Text1", ""),
"Text2" => new StringTag("Text2", ""),
"Text3" => new StringTag("Text3", ""),
"Text4" => new StringTag("Text4", "")
]);
if($player !== null){
$nbt->Creator = new StringTag("Creator", $player->getRawUniqueId());
}
if($item->hasCustomBlockData()){
foreach($item->getCustomBlockData() as $key => $v){
$nbt->{$key} = $v;
}
}
Tile::createTile("Sign", $this->getChunk($block->x >> 4, $block->z >> 4), $nbt);
}
$item->setCount($item->getCount() - 1);
if($item->getCount() <= 0){
$item = Item::get(Item::AIR, 0, 0);