Pufferfish 5.46.0
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 = 2PUFF_HALF
php
public const PUFF_HALF = 1PUFF_NONE
php
public const PUFF_NONE = 0Methods
entityBaseTick() protected
php
protected function entityBaseTick(int $tickDiff = 1) : boolgetBucketItem() protected
php
protected function getBucketItem() : \pocketmine\item\ItemgetFishDrops() protected
php
protected function getFishDrops() : arraygetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
php
public function getName() : stringgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringgetPuffState()
php
public function getPuffState() : intgetSwimSpeed() protected
php
protected function getSwimSpeed() : floatinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisThreat()
php
public static function isThreat(\pocketmine\entity\Entity $entity) : boolWhether 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) : voidsyncNetworkData() protected
php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void