Skip to content

TurtleEgg 5.46.0 ​

class · pocketmine\block\TurtleEgg · source

Extends Transparent

Turtle eggs (https://minecraft.wiki/w/Turtle_Egg): 1-4 eggs in one block, added one at a time like sea pickles. Only drop with silk touch. On sand they crack on random ticks (always around dawn, otherwise 1 in 500, like Java) and hatch after the third crack into one baby turtle per egg, whose home is the egg's position. Trampling is not implemented.

Constants ​

MAX_COUNT ​

php
public const MAX_COUNT = 4

MAX_CRACKS ​

php
public const MAX_CRACKS = 2

MIN_COUNT ​

php
public const MIN_COUNT = 1

Properties ​

$count protected ​

php
protected int $count

$cracks protected ​

php
protected int $cracks

Methods ​

canBePlacedAt() ​

php
public function canBePlacedAt(\pocketmine\block\Block $blockReplace, \pocketmine\math\Vector3 $clickVector, int $face, bool $isClickedBlock) : bool

describeBlockOnlyState() protected ​

php
protected function describeBlockOnlyState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : void

getCount() ​

php
public function getCount() : int

getCracks() ​

php
public function getCracks() : int

getDropsForCompatibleTool() ​

php
public function getDropsForCompatibleTool(\pocketmine\item\Item $item) : array

getSilkTouchDrops() ​

php
public function getSilkTouchDrops(\pocketmine\item\Item $item) : array

getSupportType() ​

php
public function getSupportType(int $facing) : \pocketmine\block\utils\SupportType

isAffectedBySilkTouch() ​

php
public function isAffectedBySilkTouch() : bool

onRandomTick() ​

php
public function onRandomTick() : void

place() ​

php
public function place(\pocketmine\world\BlockTransaction $tx, \pocketmine\item\Item $item, \pocketmine\block\Block $blockReplace, \pocketmine\block\Block $blockClicked, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null) : bool

recalculateCollisionBoxes() protected ​

php
protected function recalculateCollisionBoxes() : array

setCount() ​

php
public function setCount(int $count) : self

setCracks() ​

php
public function setCracks(int $cracks) : self

ticksRandomly() ​

php
public function ticksRandomly() : bool

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