Frog 5.46.0
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
public const TAG_PREGNANT = "IsPregnant"TAG_VARIANT
public const TAG_VARIANT = "Variant"VARIANT_COLD
public const VARIANT_COLD = 1VARIANT_TEMPERATE
public const VARIANT_TEMPERATE = 0VARIANT_WARM
public const VARIANT_WARM = 2Methods
canBreathe()
public function canBreathe() : boolcreateBaby() protected
protected function createBaby(\pocketmine\entity\animal\Animal $partner, \pocketmine\entity\Location $location) : \pocketmine\entity\animal\AnimalcreateMoveControl() protected
protected function createMoveControl() : \pocketmine\entity\ai\control\MoveControleatMob()
public function eatMob(\pocketmine\entity\Living $mob) : voidSwallows the mob: it disappears (no drops of its own) and the frog's loot table drops where it was.
findWanderPos()
public function findWanderPos(int $horizontal, int $vertical, ?\pocketmine\math\Vector3 $awayFrom = null) : ?\pocketmine\math\Vector3getEatDrop()
public function getEatDrop(\pocketmine\entity\Living $mob) : ?\pocketmine\item\ItemLoot of loot_tables/entities/frog.json for the eaten mob.
getInitialSizeInfo() protected
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
public function getName() : stringgetNetworkTypeId()
public static function getNetworkTypeId() : stringgetVariant()
public function getVariant() : intinitEntity() protected
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisBreedingItem()
public function isBreedingItem(\pocketmine\item\Item $item) : boolisEatingMob()
public function isEatingMob() : boolisFood()
public static function isFood(\pocketmine\entity\Living $entity) : boolWhether frogs eat this mob: small slimes and small magma cubes.
isPregnant()
public function isPregnant() : boolregisterGoals() protected
protected function registerGoals() : voidsaveNBT()
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetEatingMob()
public function setEatingMob(bool $eating) : voidsetPregnant()
public function setPregnant(bool $pregnant) : voidsetVariant()
public function setVariant(int $variant) : voidspawnBaby() protected
protected function spawnBaby(\pocketmine\entity\animal\Animal $partner) : ?\pocketmine\entity\animal\AnimalsyncNetworkData() protected
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : voidvariantForBiome()
public static function variantForBiome(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos) : int