Skip to content

Frog 5.46.0 ​

class · pocketmine\entity\animal\Frog · source

Extends Animal

Bedrock values (entities/frog.json): 10 health, 0.5x0.55, walks at 0.1, swims at 0.15 (amphibious), panics at 2x, tempted and bred with slime balls. Breeding makes the frog pregnant: it then lays frogspawn on a water source within 10 blocks (which hatches into tadpoles). Variants (VARIANT): 0 temperate, 1 cold, 2 warm, by biome tags (spawns_cold_variant_frogs / spawns_warm_variant_frogs). Frogs hunt small (size 1) slimes and magma cubes they see within 16 blocks and eat them with their tongue (FrogEatMobGoal); loot_tables/entities/frog.json: a slime ball for a slime, a froglight for a magma cube (ochre from temperate frogs, verdant from cold ones, pearlescent from warm ones).

Constants ​

TAG_PREGNANT ​

php
public const TAG_PREGNANT = "IsPregnant"

TAG_VARIANT ​

php
public const TAG_VARIANT = "Variant"

VARIANT_COLD ​

php
public const VARIANT_COLD = 1

VARIANT_TEMPERATE ​

php
public const VARIANT_TEMPERATE = 0

VARIANT_WARM ​

php
public const VARIANT_WARM = 2

Methods ​

canBreathe() ​

php
public function canBreathe() : bool

createBaby() protected ​

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

createMoveControl() protected ​

php
protected function createMoveControl() : \pocketmine\entity\ai\control\MoveControl

eatMob() ​

php
public function eatMob(\pocketmine\entity\Living $mob) : void

Swallows the mob: it disappears (no drops of its own) and the frog's loot table drops where it was.

findWanderPos() ​

php
public function findWanderPos(int $horizontal, int $vertical, ?\pocketmine\math\Vector3 $awayFrom = null) : ?\pocketmine\math\Vector3

getEatDrop() ​

php
public function getEatDrop(\pocketmine\entity\Living $mob) : ?\pocketmine\item\Item

Loot of loot_tables/entities/frog.json for the eaten mob.

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

isBreedingItem() ​

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

isEatingMob() ​

php
public function isEatingMob() : bool

isFood() ​

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

Whether frogs eat this mob: small slimes and small magma cubes.

isPregnant() ​

php
public function isPregnant() : bool

registerGoals() protected ​

php
protected function registerGoals() : void

saveNBT() ​

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

setEatingMob() ​

php
public function setEatingMob(bool $eating) : void

setPregnant() ​

php
public function setPregnant(bool $pregnant) : void

setVariant() ​

php
public function setVariant(int $variant) : void

spawnBaby() protected ​

php
protected function spawnBaby(\pocketmine\entity\animal\Animal $partner) : ?\pocketmine\entity\animal\Animal

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

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