Skip to content

Silverfish 5.46.0 ​

class · pocketmine\entity\monster\Silverfish · source

Extends Monster

Bedrock values (silverfish.json): 8 health, 0.4x0.3, movement 0.25, attack 1, targets players within 8 blocks. When hurt it wakes up the silverfish hidden in infested blocks within 10 blocks (behavior.silverfish_wake_up_friends); when idle it may hide in an adjacent stone-like block, turning it into its infested variant (behavior.silverfish_merge_with_stone). No loot.

Constants ​

ATTACK_DAMAGE ​

php
public const ATTACK_DAMAGE = 1.0

WAKE_UP_DELAY ​

php
public const WAKE_UP_DELAY = 20

Methods ​

attack() ​

php
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : void

entityBaseTick() protected ​

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

getInfestedVariant() ​

php
public static function getInfestedVariant(\pocketmine\block\Block $block) : ?\pocketmine\block\Block

Returns the infested variant of a stone-like block, or null if silverfish can't hide in it.

getInitialSizeInfo() protected ​

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

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getPickedItem() ​

php
public function getPickedItem() : ?\pocketmine\item\Item

getXpDropAmount() ​

php
public function getXpDropAmount() : int

initEntity() protected ​

php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : void

registerGoals() protected ​

php
protected function registerGoals() : void

spawnFromBlock() ​

php
public static function spawnFromBlock(\pocketmine\world\World $world, \pocketmine\math\Vector3 $blockPos) : \pocketmine\entity\monster\Silverfish

Spawns the silverfish hidden in the infested block at the given position.

tryHideInBlock() ​

php
public function tryHideInBlock() : bool

Hides in a random adjacent stone-like block (it becomes infested and the silverfish disappears). Returns whether it hid.

wakeUpFriends() ​

php
public function wakeUpFriends() : void

Breaks the infested blocks within 10 blocks, releasing their silverfish (vanilla: up to 10x5x10 around).

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