Renamed NBT tags to have Tag in the name

This commit is contained in:
Shoghi Cervantes
2015-08-12 21:30:15 +02:00
parent 34dc6ea0d6
commit 7f8b39a63c
58 changed files with 791 additions and 791 deletions

View File

@ -22,24 +22,24 @@
namespace pocketmine\tile;
use pocketmine\level\format\FullChunk;
use pocketmine\nbt\tag\Compound;
use pocketmine\nbt\tag\Int;
use pocketmine\nbt\tag\String;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\nbt\tag\IntTag;
use pocketmine\nbt\tag\StringTag;
class Sign extends Spawnable{
public function __construct(FullChunk $chunk, Compound $nbt){
public function __construct(FullChunk $chunk, CompoundTag $nbt){
if(!isset($nbt->Text1)){
$nbt->Text1 = new String("Text1", "");
$nbt->Text1 = new StringTag("Text1", "");
}
if(!isset($nbt->Text2)){
$nbt->Text2 = new String("Text2", "");
$nbt->Text2 = new StringTag("Text2", "");
}
if(!isset($nbt->Text3)){
$nbt->Text3 = new String("Text3", "");
$nbt->Text3 = new StringTag("Text3", "");
}
if(!isset($nbt->Text4)){
$nbt->Text4 = new String("Text4", "");
$nbt->Text4 = new StringTag("Text4", "");
}
parent::__construct($chunk, $nbt);
@ -51,10 +51,10 @@ class Sign extends Spawnable{
}
public function setText($line1 = "", $line2 = "", $line3 = "", $line4 = ""){
$this->namedtag->Text1 = new String("Text1", $line1);
$this->namedtag->Text2 = new String("Text2", $line2);
$this->namedtag->Text3 = new String("Text3", $line3);
$this->namedtag->Text4 = new String("Text4", $line4);
$this->namedtag->Text1 = new StringTag("Text1", $line1);
$this->namedtag->Text2 = new StringTag("Text2", $line2);
$this->namedtag->Text3 = new StringTag("Text3", $line3);
$this->namedtag->Text4 = new StringTag("Text4", $line4);
$this->spawnToAll();
if($this->chunk){
@ -75,15 +75,15 @@ class Sign extends Spawnable{
}
public function getSpawnCompound(){
return new Compound("", [
new String("id", Tile::SIGN),
return new CompoundTag("", [
new StringTag("id", Tile::SIGN),
$this->namedtag->Text1,
$this->namedtag->Text2,
$this->namedtag->Text3,
$this->namedtag->Text4,
new Int("x", (int) $this->x),
new Int("y", (int) $this->y),
new Int("z", (int) $this->z)
new IntTag("x", (int) $this->x),
new IntTag("y", (int) $this->y),
new IntTag("z", (int) $this->z)
]);
}