mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
Create sign tile like it should be.
This commit is contained in:
committed by
Dylan K. Taylor
parent
5f8dc5829c
commit
900c4adb66
@ -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);
|
||||
|
Reference in New Issue
Block a user