Skip to content

Horse 5.46.0 ​

class · pocketmine\entity\animal\Horse · source

Extends AbstractHorse

Bedrock values (entities/horse.json): 15-30 health, movement 0.1125-0.3375, jump strength 0.4-1.0, 1.4x1.6. Coat (VARIANT 0-6: white, creamy, chestnut, brown, black, gray, dark brown) and markings (MARK_VARIANT 0-4). Bred (tamed) with golden apples and golden carrots; with a donkey it makes a mule. Babies take a parent's coat and either parent's markings (Java: 1/9 chance each of a random coat or markings). Wears horse armor (see AbstractHorse). Loot (loot_tables/entities/horse.json): 0-2 leather (+0-1 per Looting level); XP 1-3.

Constants ​

TAG_MARK_VARIANT ​

php
public const TAG_MARK_VARIANT = "MarkVariant"

TAG_VARIANT ​

php
public const TAG_VARIANT = "Variant"

Methods ​

breedsWith() protected ​

php
protected function breedsWith(\pocketmine\entity\animal\Animal $other) : bool

createBaby() protected ​

php
protected function createBaby(\pocketmine\entity\animal\Animal $partner, \pocketmine\entity\Location $location) : \pocketmine\entity\animal\Animal

getCoat() ​

php
public function getCoat() : int

getInitialSizeInfo() protected ​

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

getMarkings() ​

php
public function getMarkings() : int

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

hasArmorSlot() ​

php
public function hasArmorSlot() : bool

initEntity() protected ​

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

randomStats() protected ​

php
protected function randomStats() : array

saveNBT() ​

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

setAppearance() ​

php
public function setAppearance(int $coat, int $markings) : void

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.