Skip to content

Wolf 5.46.0 ​

class · pocketmine\entity\animal\Wolf · source

Extends TameableAnimal

Bedrock values (entities/wolf.json): 8 health (40 when tamed), 0.6x0.8, movement 0.3, attack 3 (4 when tamed). Tamed with bones (1 in 3), then sits when ordered, follows its owner (teleports beyond 12 blocks), attacks what hurts the owner or what the owner attacks; healed and bred (tamed, full health) with meat; red collar dyeable by the owner (COLOR). Wild wolves hunt sheep, rabbits, foxes and skeletons, flee from llamas and get angry at whoever hurts them (nearby wild wolves join in). Variants (VARIANT 0-8) by biome as in 1.20.5+, sound variant property.

Constants ​

SOUND_VARIANTS ​

php
public const SOUND_VARIANTS = ["default", "big", "cute", "grumpy", "mad", "puglin", "sad"]

TAG_ANGRY_TICKS ​

php
public const TAG_ANGRY_TICKS = "AngerTime"

TAG_COLLAR_COLOR ​

php
public const TAG_COLLAR_COLOR = "CollarColor"

TAG_SOUND_VARIANT ​

php
public const TAG_SOUND_VARIANT = "SoundVariant"

TAG_VARIANT ​

php
public const TAG_VARIANT = "Variant"

VARIANT_ASHEN ​

php
public const VARIANT_ASHEN = 1

VARIANT_BLACK ​

php
public const VARIANT_BLACK = 2

VARIANT_CHESTNUT ​

php
public const VARIANT_CHESTNUT = 3

VARIANT_PALE ​

php
public const VARIANT_PALE = 0

VARIANT_RUSTY ​

php
public const VARIANT_RUSTY = 4

VARIANT_SNOWY ​

php
public const VARIANT_SNOWY = 5

VARIANT_SPOTTED ​

php
public const VARIANT_SPOTTED = 6

VARIANT_STRIPED ​

php
public const VARIANT_STRIPED = 7

VARIANT_WOODS ​

php
public const VARIANT_WOODS = 8

Methods ​

attack() ​

php
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : void

attackMelee() ​

php
public function attackMelee(\pocketmine\entity\Living $target, float $baseDamage) : bool

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

entityBaseTick() protected ​

php
protected function entityBaseTick(int $tickDiff = 1) : bool

getCollarColor() ​

php
public function getCollarColor() : \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

getVariant() ​

php
public function getVariant() : int

initEntity() protected ​

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

isAngry() ​

php
public function isAngry() : bool

isBreedingItem() ​

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

isPrey() ​

php
public static function isPrey(\pocketmine\entity\Living $entity) : bool

onInteractWithItem() protected ​

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

onTamedChanged() protected ​

php
protected function onTamedChanged() : void

registerGoals() protected ​

php
protected function registerGoals() : void

saveNBT() ​

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

setAngry() ​

php
public function setAngry(int $ticks) : void

setCollarColor() ​

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

setVariant() ​

php
public function setVariant(int $variant) : void

syncNetworkData() protected ​

php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void

variantForBiome() ​

php
public static function variantForBiome(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos) : int

Wolf variant of a biome (Java 1.20.5 rules, Bedrock biome names).

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