Silverfish 5.46.0
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
public const ATTACK_DAMAGE = 1.0WAKE_UP_DELAY
public const WAKE_UP_DELAY = 20Methods
attack()
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : voidentityBaseTick() protected
protected function entityBaseTick(int $tickDiff = 1) : boolgetInfestedVariant()
public static function getInfestedVariant(\pocketmine\block\Block $block) : ?\pocketmine\block\BlockReturns the infested variant of a stone-like block, or null if silverfish can't hide in it.
getInitialSizeInfo() protected
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
public function getName() : stringgetNetworkTypeId()
public static function getNetworkTypeId() : stringgetPickedItem()
public function getPickedItem() : ?\pocketmine\item\ItemgetXpDropAmount()
public function getXpDropAmount() : intinitEntity() protected
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidregisterGoals() protected
protected function registerGoals() : voidspawnFromBlock()
public static function spawnFromBlock(\pocketmine\world\World $world, \pocketmine\math\Vector3 $blockPos) : \pocketmine\entity\monster\SilverfishSpawns the silverfish hidden in the infested block at the given position.
tryHideInBlock()
public function tryHideInBlock() : boolHides in a random adjacent stone-like block (it becomes infested and the silverfish disappears). Returns whether it hid.
wakeUpFriends()
public function wakeUpFriends() : voidBreaks the infested blocks within 10 blocks, releasing their silverfish (vanilla: up to 10x5x10 around).
