Skip to content

Pufferfish 5.46.0 ​

class · pocketmine\entity\aquatic\Pufferfish · source

Extends AbstractFish

Bedrock values (entities/pufferfish.json): 3 health, 0.8x0.8 at scale 1.2, underwater speed 0.13. Puffs up when a player or a non-aquatic mob (or an axolotl) comes within 2.5 blocks: half puffed, then fully puffed 2 seconds later (VARIANT 0/1/2). Fully puffed, it hurts what touches it (2 damage every 0.5 s) and poisons it for 10 seconds; it deflates back in two 2-3 second steps once nothing is within 2.9 blocks. Loot (loot_tables/entities/pufferfish.json): 1 pufferfish, 25% bone.

Constants ​

PUFF_FULL ​

php
public const PUFF_FULL = 2

PUFF_HALF ​

php
public const PUFF_HALF = 1

PUFF_NONE ​

php
public const PUFF_NONE = 0

Methods ​

entityBaseTick() protected ​

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

getBucketItem() protected ​

php
protected function getBucketItem() : \pocketmine\item\Item

getFishDrops() protected ​

php
protected function getFishDrops() : array

getInitialSizeInfo() protected ​

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

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getPuffState() ​

php
public function getPuffState() : int

getSwimSpeed() protected ​

php
protected function getSwimSpeed() : float

initEntity() protected ​

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

isThreat() ​

php
public static function isThreat(\pocketmine\entity\Entity $entity) : bool

Whether the entity makes the pufferfish puff up (Bedrock filter: players, and mobs that aren't aquatic except axolotls).

setPuffState() ​

php
public function setPuffState(int $state) : void

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.