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

@ -25,11 +25,11 @@ use pocketmine\block\Block;
use pocketmine\entity\Entity;
use pocketmine\level\format\FullChunk;
use pocketmine\level\Level;
use pocketmine\nbt\tag\Compound;
use pocketmine\nbt\tag\Double;
use pocketmine\nbt\tag\Enum;
use pocketmine\nbt\tag\Float;
use pocketmine\nbt\tag\String;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\nbt\tag\DoubleTag;
use pocketmine\nbt\tag\ListTag;
use pocketmine\nbt\tag\FloatTag;
use pocketmine\nbt\tag\StringTag;
use pocketmine\Player;
class SpawnEgg extends Item{
@ -49,25 +49,25 @@ class SpawnEgg extends Item{
return false;
}
$nbt = new Compound("", [
"Pos" => new Enum("Pos", [
new Double("", $block->getX() + 0.5),
new Double("", $block->getY()),
new Double("", $block->getZ() + 0.5)
$nbt = new CompoundTag("", [
"Pos" => new ListTag("Pos", [
new DoubleTag("", $block->getX() + 0.5),
new DoubleTag("", $block->getY()),
new DoubleTag("", $block->getZ() + 0.5)
]),
"Motion" => new Enum("Motion", [
new Double("", 0),
new Double("", 0),
new Double("", 0)
"Motion" => new ListTag("Motion", [
new DoubleTag("", 0),
new DoubleTag("", 0),
new DoubleTag("", 0)
]),
"Rotation" => new Enum("Rotation", [
new Float("", lcg_value() * 360),
new Float("", 0)
"Rotation" => new ListTag("Rotation", [
new FloatTag("", lcg_value() * 360),
new FloatTag("", 0)
]),
]);
if($this->hasCustomName()){
$nbt->CustomName = new String("CustomName", $this->getCustomName());
$nbt->CustomName = new StringTag("CustomName", $this->getCustomName());
}
$entity = Entity::createEntity($this->meta, $chunk, $nbt);