Mooshroom 5.46.0
Extends Cow
Bedrock values (entities/mooshroom.json): a cow (10 health, 0.9x1.3, movement 0.25, bred with wheat, milked with a bucket) that is red (VARIANT 0) or brown (1). A bowl gives mushroom stew; a brown mooshroom fed a flower gives one suspicious stew of that flower next (MARK_VARIANT = the flower, -1 for none). Shears turn it into a cow and drop 5 mushrooms of its colour. Two mooshrooms of the same colour have a 1/1024 chance of a baby of the other colour. Loot (loot_tables/entities/mooshroom.json): 0-2 leather and 1-3 beef (cooked when burning), +0-1 each per Looting level. Lightning switches the colour (red <-> brown).
Constants
TAG_STEW_FLOWER
public const TAG_STEW_FLOWER = "MarkVariant"TAG_VARIANT
public const TAG_VARIANT = "Variant"VARIANT_BROWN
public const VARIANT_BROWN = 1VARIANT_RED
public const VARIANT_RED = 0Methods
createBaby() protected
protected function createBaby(\pocketmine\entity\animal\Animal $partner, \pocketmine\entity\Location $location) : \pocketmine\entity\animal\AnimalgetName()
public function getName() : stringgetNetworkTypeId()
public static function getNetworkTypeId() : stringgetVariant()
public function getVariant() : intinitEntity() protected
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidonInteractWithItem() protected
protected function onInteractWithItem(\pocketmine\player\Player $player, \pocketmine\item\Item $item) : boolonStruckByLightning()
public function onStruckByLightning(\pocketmine\entity\object\LightningBolt $bolt) : voidVanilla: lightning turns a red mooshroom brown and a brown one red (once per bolt), without hurting it.
saveNBT()
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetVariant()
public function setVariant(int $variant) : voidshear()
public function shear() : ?\pocketmine\entity\animal\CowTurns the mooshroom into a cow, dropping 5 mushrooms. Returns the cow, or null if it can't be sheared now.
stewTypeForFlower()
public static function stewTypeForFlower(\pocketmine\item\Item $item) : ?\pocketmine\item\SuspiciousStewTypeSuspicious stew kind given by a flower item, or null if it isn't one.
syncNetworkData() protected
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void