Sheep 5.46.0
Extends Animal
Bedrock values: 8 health, movement 0.25, 0.9x1.3, bred with wheat. Sheared with shears for 1-3 wool of its colour; eating grass regrows the wool. Dyed with any dye. Natural colours: white 81.836%, black, gray and light gray 5% each, brown 3%, pink 0.164%. Loot: 1 wool when not sheared, 1-2 mutton (cooked when burning) +0-1 per Looting level.
Constants
TAG_COLOR
php
public const TAG_COLOR = "Color"TAG_SHEARED
php
public const TAG_SHEARED = "Sheared"Methods
createBaby() protected
php
protected function createBaby(\pocketmine\entity\animal\Animal $partner, \pocketmine\entity\Location $location) : \pocketmine\entity\animal\AnimalgetAdultDrops() protected
php
protected function getAdultDrops() : arraygetColor()
php
public function getColor() : \pocketmine\block\utils\DyeColorgetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
php
public function getName() : stringgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisBreedingItem()
php
public function isBreedingItem(\pocketmine\item\Item $item) : boolisSheared()
php
public function isSheared() : boolonEatGrass()
php
public function onEatGrass() : voidCalled by the eat grass goal when the sheep has eaten.
onInteractWithItem() protected
php
protected function onInteractWithItem(\pocketmine\player\Player $player, \pocketmine\item\Item $item) : boolrandomNaturalColor()
php
public static function randomNaturalColor() : \pocketmine\block\utils\DyeColorVanilla natural colour distribution of spawned sheep.
registerGoals() protected
php
protected function registerGoals() : voidsaveNBT()
php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetColor()
php
public function setColor(\pocketmine\block\utils\DyeColor $color) : voidsetSheared()
php
public function setSheared(bool $sheared) : voidshear()
php
public function shear() : boolShears the sheep, dropping 1-3 wool. Returns false if it can't be sheared now.
syncNetworkData() protected
php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void