Skip to content

Goat 5.46.0 ​

class · pocketmine\entity\animal\Goat · source

Extends Animal

Bedrock values (entities/goat.json): 10 health, 0.9x1.3, movement 0.4, attack 2 (babies 1). Screaming goats (VARIANT 1) are 2% of spawns. Rams (behavior.ram_attack): every 30-300 seconds (screamers 5-15) a goat picks a mob or survival player 4-16 blocks away, waits a second and charges at 1.8x; the target takes the attack damage and a strong knockback (Bedrock knockback_force 2.5, approximated as 2.5x the normal knockback). Charging into a log, stone, ore, packed ice or copper block breaks off a horn (GOAT_HORN_COUNT, 2 at most) which drops as a goat horn (screamers drop the screaming kinds). Milked with a bucket; tempted (0.75x) and bred with wheat; takes 10 less fall damage. No loot; XP 1-3. Every 30-60 seconds an idle goat may leap onto a block 2-10 blocks higher within 10 blocks (behavior.jump_to_block, see LongJumpGoal; JUMP_GOAL_JUMP flag while in the air).

Constants ​

TAG_HORNS ​

php
public const TAG_HORNS = "GoatHornCount"

TAG_SCREAMER ​

php
public const TAG_SCREAMER = "IsScreamer"

Methods ​

breaksHorn() ​

php
public static function breaksHorn(\pocketmine\block\Block $block) : bool

Blocks that break a horn off (Bedrock goat behaviour: logs, stone, ores, packed ice, copper ore).

calculateFallDamage() protected ​

php
protected function calculateFallDamage(float $fallDistance) : float

canRam() ​

php
public function canRam() : bool

createBaby() protected ​

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

createHorn() ​

php
public function createHorn() : \pocketmine\item\Item

destroyCycles() protected ​

php
protected function destroyCycles() : void

entityBaseTick() protected ​

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

findRamTarget() ​

php
public function findRamTarget() : ?\pocketmine\entity\Living

Picks a mob or a survival player 4 to 16 blocks away in sight (not goats).

getHornCount() ​

php
public function getHornCount() : int

getInitialSizeInfo() protected ​

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

getLongJumpGoal() ​

php
public function getLongJumpGoal() : \pocketmine\entity\ai\goal\LongJumpGoal

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

isLongJumping() ​

php
public function isLongJumping() : bool

isScreamer() ​

php
public function isScreamer() : bool

onInteractWithItem() protected ​

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

playAmbientSound() protected ​

php
protected function playAmbientSound() : void

ramBlock() ​

php
public function ramBlock(\pocketmine\math\Vector3 $direction) : void

ramInto() ​

php
public function ramInto(\pocketmine\entity\Living $target, \pocketmine\math\Vector3 $direction) : void

registerGoals() protected ​

php
protected function registerGoals() : void

resetRamCooldown() ​

php
public function resetRamCooldown() : void

saveNBT() ​

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

setHornCount() ​

php
public function setHornCount(int $horns) : void

setRamming() ​

php
public function setRamming(bool $ramming) : void

setScreamer() ​

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