Skip to content

Ocelot 5.46.0 ​

class · pocketmine\entity\animal\Ocelot · source

Extends Animal

Bedrock values (entities/ocelot.json): 10 health, 0.6x0.7, movement 0.3. Wild ocelots flee from players (10 blocks), are tempted by raw cod and salmon (0.5x) and hunt chickens and baby turtles. Feeding them fish makes them trust the player (1 in 3, TRUSTING flag): trusting ocelots don't flee and can be bred with fish. They can't be tamed (since 1.14). No loot; XP 1-3.

Constants ​

TAG_TRUSTING ​

php
public const TAG_TRUSTING = "IsTrusting"

Methods ​

canFallInLove() protected ​

php
protected function canFallInLove(\pocketmine\player\Player $player) : bool

createBaby() protected ​

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

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

isTrusting() ​

php
public function isTrusting() : bool

onInteractWithItem() protected ​

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

registerGoals() protected ​

php
protected function registerGoals() : void

saveNBT() ​

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

setTrusting() ​

php
public function setTrusting(bool $trusting) : 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.