Wolf 5.46.0
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 = 1VARIANT_BLACK
php
public const VARIANT_BLACK = 2VARIANT_CHESTNUT
php
public const VARIANT_CHESTNUT = 3VARIANT_PALE
php
public const VARIANT_PALE = 0VARIANT_RUSTY
php
public const VARIANT_RUSTY = 4VARIANT_SNOWY
php
public const VARIANT_SNOWY = 5VARIANT_SPOTTED
php
public const VARIANT_SPOTTED = 6VARIANT_STRIPED
php
public const VARIANT_STRIPED = 7VARIANT_WOODS
php
public const VARIANT_WOODS = 8Methods
attack()
php
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : voidattackMelee()
php
public function attackMelee(\pocketmine\entity\Living $target, float $baseDamage) : boolcanFallInLove() protected
php
protected function canFallInLove(\pocketmine\player\Player $player) : boolcreateBaby() protected
php
protected function createBaby(\pocketmine\entity\animal\Animal $partner, \pocketmine\entity\Location $location) : \pocketmine\entity\animal\AnimalentityBaseTick() protected
php
protected function entityBaseTick(int $tickDiff = 1) : boolgetCollarColor()
php
public function getCollarColor() : \pocketmine\block\utils\DyeColorgetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
php
public function getName() : stringgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringgetVariant()
php
public function getVariant() : intinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisAngry()
php
public function isAngry() : boolisBreedingItem()
php
public function isBreedingItem(\pocketmine\item\Item $item) : boolisPrey()
php
public static function isPrey(\pocketmine\entity\Living $entity) : boolonInteractWithItem() protected
php
protected function onInteractWithItem(\pocketmine\player\Player $player, \pocketmine\item\Item $item) : boolonTamedChanged() protected
php
protected function onTamedChanged() : voidregisterGoals() protected
php
protected function registerGoals() : voidsaveNBT()
php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetAngry()
php
public function setAngry(int $ticks) : voidsetCollarColor()
php
public function setCollarColor(\pocketmine\block\utils\DyeColor $color) : voidsetVariant()
php
public function setVariant(int $variant) : voidsyncNetworkData() protected
php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : voidvariantForBiome()
php
public static function variantForBiome(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos) : intWolf variant of a biome (Java 1.20.5 rules, Bedrock biome names).
