Spawnable: change visibility of addAdditionalSpawnData()

This commit is contained in:
Dylan K. Taylor 2018-06-03 19:58:48 +01:00
parent 4c1d29cdf7
commit fe21f0e916
10 changed files with 10 additions and 10 deletions

View File

@ -118,7 +118,7 @@ class Banner extends Spawnable implements Nameable{
$this->saveName($nbt);
}
public function addAdditionalSpawnData(CompoundTag $nbt) : void{
protected function addAdditionalSpawnData(CompoundTag $nbt) : void{
$nbt->setInt(self::TAG_BASE, $this->baseColor);
$nbt->setTag($this->patterns);
$this->addNameSpawnData($nbt);

View File

@ -51,7 +51,7 @@ class Bed extends Spawnable{
$nbt->setByte(self::TAG_COLOR, $this->color);
}
public function addAdditionalSpawnData(CompoundTag $nbt) : void{
protected function addAdditionalSpawnData(CompoundTag $nbt) : void{
$nbt->setByte(self::TAG_COLOR, $this->color);
}

View File

@ -192,7 +192,7 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
return true;
}
public function addAdditionalSpawnData(CompoundTag $nbt) : void{
protected function addAdditionalSpawnData(CompoundTag $nbt) : void{
if($this->isPaired()){
$nbt->setInt(self::TAG_PAIRX, $this->pairX);
$nbt->setInt(self::TAG_PAIRZ, $this->pairZ);

View File

@ -35,7 +35,7 @@ class EnderChest extends Spawnable{
}
public function addAdditionalSpawnData(CompoundTag $nbt) : void{
protected function addAdditionalSpawnData(CompoundTag $nbt) : void{
}

View File

@ -83,7 +83,7 @@ class FlowerPot extends Spawnable{
return $this->getItem()->isNull();
}
public function addAdditionalSpawnData(CompoundTag $nbt) : void{
protected function addAdditionalSpawnData(CompoundTag $nbt) : void{
$nbt->setShort(self::TAG_ITEM, $this->item->getId());
$nbt->setInt(self::TAG_ITEM_DATA, $this->item->getDamage());
}

View File

@ -230,7 +230,7 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
return $ret;
}
public function addAdditionalSpawnData(CompoundTag $nbt) : void{
protected function addAdditionalSpawnData(CompoundTag $nbt) : void{
$nbt->setShort(self::TAG_BURN_TIME, $this->burnTime);
$nbt->setShort(self::TAG_COOK_TIME, $this->cookTime);

View File

@ -90,7 +90,7 @@ class ItemFrame extends Spawnable{
$this->onChanged();
}
public function addAdditionalSpawnData(CompoundTag $nbt) : void{
protected function addAdditionalSpawnData(CompoundTag $nbt) : void{
$nbt->setFloat(self::TAG_ITEM_DROP_CHANCE, $this->itemDropChance);
$nbt->setByte(self::TAG_ITEM_ROTATION, $this->itemRotation);
$nbt->setTag($this->item->nbtSerialize(-1, self::TAG_ITEM));

View File

@ -120,7 +120,7 @@ class Sign extends Spawnable{
return $this->text;
}
public function addAdditionalSpawnData(CompoundTag $nbt) : void{
protected function addAdditionalSpawnData(CompoundTag $nbt) : void{
$nbt->setString(self::TAG_TEXT_BLOB, implode("\n", $this->text));
}

View File

@ -65,7 +65,7 @@ class Skull extends Spawnable{
return $this->skullType;
}
public function addAdditionalSpawnData(CompoundTag $nbt) : void{
protected function addAdditionalSpawnData(CompoundTag $nbt) : void{
$nbt->setByte(self::TAG_SKULL_TYPE, $this->skullType);
$nbt->setByte(self::TAG_ROT, $this->skullRotation);
}

View File

@ -120,7 +120,7 @@ abstract class Spawnable extends Tile{
*
* @param CompoundTag $nbt
*/
abstract public function addAdditionalSpawnData(CompoundTag $nbt) : void;
abstract protected function addAdditionalSpawnData(CompoundTag $nbt) : void;
/**
* Called when a player updates a block entity's NBT data