Turtle 5.46.0
Extends Animal
Bedrock values (entities/turtle.json): 30 health, adults 1.2x0.4, babies scale 0.16, walks at 0.1, swims at 0.12 (babies 0.06), amphibious, tempted and bred with seagrass. Breeding makes the turtle pregnant: it goes back to its home (where it hatched or first spawned) and lays 1-4 eggs on sand there. A baby growing up drops a turtle scute. Loot (loot_tables/entities/sea_turtle.json): 0-2 seagrass (+0-1 per Looting level). Lightning kills it, and it then drops a bowl.
Constants
TAG_HOME_X
php
public const TAG_HOME_X = "HomeX"TAG_HOME_Y
php
public const TAG_HOME_Y = "HomeY"TAG_HOME_Z
php
public const TAG_HOME_Z = "HomeZ"TAG_PREGNANT
php
public const TAG_PREGNANT = "IsPregnant"Methods
canBreathe()
php
public function canBreathe() : boolcreateBaby() protected
php
protected function createBaby(\pocketmine\entity\animal\Animal $partner, \pocketmine\entity\Location $location) : \pocketmine\entity\animal\AnimalcreateMoveControl() protected
php
protected function createMoveControl() : \pocketmine\entity\ai\control\MoveControlentityBaseTick() protected
php
protected function entityBaseTick(int $tickDiff = 1) : boolfindWanderPos()
php
public function findWanderPos(int $horizontal, int $vertical, ?\pocketmine\math\Vector3 $awayFrom = null) : ?\pocketmine\math\Vector3getAdultDrops() protected
php
protected function getAdultDrops() : arraygetBabyScale() protected
php
protected function getBabyScale() : floatgetDrops()
php
public function getDrops() : arraygetHomePosition()
php
public function getHomePosition() : \pocketmine\math\Vector3getInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
php
public function getName() : stringgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisBreedingItem()
php
public function isBreedingItem(\pocketmine\item\Item $item) : boolisPregnant()
php
public function isPregnant() : boolonGrowUp() protected
php
protected function onGrowUp() : voidonStruckByLightning()
php
public function onStruckByLightning(\pocketmine\entity\object\LightningBolt $bolt) : voidVanilla: lightning kills a turtle outright, and it drops a bowl.
registerGoals() protected
php
protected function registerGoals() : voidsaveNBT()
php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetHomePosition()
php
public function setHomePosition(\pocketmine\math\Vector3 $home) : voidsetPregnant()
php
public function setPregnant(bool $pregnant) : voidspawnBaby() protected
php
protected function spawnBaby(\pocketmine\entity\animal\Animal $partner) : ?\pocketmine\entity\animal\AnimalsyncNetworkData() protected
php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void