Skip to content

SnifferEgg 5.46.0 ​

class · pocketmine\block\SnifferEgg · source

Extends Transparent

Sniffer egg (https://minecraft.wiki/w/Sniffer_Egg). Cracks twice and then hatches into a baby sniffer. Vanilla takes about 20 minutes (10 on moss) in three scheduled steps; here each random tick (one every ~1365 ticks on average) advances a step with a 1 in 6 chance (1 in 3 on moss), which gives about the same time.

Constants ​

MAX_CRACKS ​

php
public const MAX_CRACKS = 2

Properties ​

$cracks protected ​

php
protected int $cracks

Methods ​

describeBlockOnlyState() protected ​

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

getCracks() ​

php
public function getCracks() : int

Returns how cracked the egg is: 0 (no cracks), 1 (cracked) or 2 (about to hatch).

onRandomTick() ​

php
public function onRandomTick() : void

recalculateCollisionBoxes() protected ​

php
protected function recalculateCollisionBoxes() : array

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.