Skip to content

Turtle 5.46.0 ​

class · pocketmine\entity\animal\Turtle · source

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() : 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

entityBaseTick() protected ​

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

findWanderPos() ​

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

getAdultDrops() protected ​

php
protected function getAdultDrops() : array

getBabyScale() protected ​

php
protected function getBabyScale() : float

getDrops() ​

php
public function getDrops() : array

getHomePosition() ​

php
public function getHomePosition() : \pocketmine\math\Vector3

getInitialSizeInfo() protected ​

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

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

isPregnant() ​

php
public function isPregnant() : bool

onGrowUp() protected ​

php
protected function onGrowUp() : void

onStruckByLightning() ​

php
public function onStruckByLightning(\pocketmine\entity\object\LightningBolt $bolt) : void

Vanilla: lightning kills a turtle outright, and it drops a bowl.

registerGoals() protected ​

php
protected function registerGoals() : void

saveNBT() ​

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

setHomePosition() ​

php
public function setHomePosition(\pocketmine\math\Vector3 $home) : void

setPregnant() ​

php
public function setPregnant(bool $pregnant) : 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

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