Skip to content

Sheep 5.46.0 ​

class · pocketmine\entity\animal\Sheep · source

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\Animal

getAdultDrops() protected ​

php
protected function getAdultDrops() : array

getColor() ​

php
public function getColor() : \pocketmine\block\utils\DyeColor

getInitialSizeInfo() protected ​

php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfo

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

initEntity() protected ​

php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : void

isBreedingItem() ​

php
public function isBreedingItem(\pocketmine\item\Item $item) : bool

isSheared() ​

php
public function isSheared() : bool

onEatGrass() ​

php
public function onEatGrass() : void

Called by the eat grass goal when the sheep has eaten.

onInteractWithItem() protected ​

php
protected function onInteractWithItem(\pocketmine\player\Player $player, \pocketmine\item\Item $item) : bool

randomNaturalColor() ​

php
public static function randomNaturalColor() : \pocketmine\block\utils\DyeColor

Vanilla natural colour distribution of spawned sheep.

registerGoals() protected ​

php
protected function registerGoals() : void

saveNBT() ​

php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTag

setColor() ​

php
public function setColor(\pocketmine\block\utils\DyeColor $color) : void

setSheared() ​

php
public function setSheared(bool $sheared) : void

shear() ​

php
public function shear() : bool

Shears 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

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.