Skip to content

AbstractFish 5.46.0 ​

abstract class · pocketmine\entity\aquatic\AbstractFish · source

Extends Mob
Implements BucketableMob

Cod, salmon, pufferfish and tropical fish (Bedrock "fish" family): 3 health, swim around in water, flee from players and axolotls, flop on land and suffocate there. Caught with a water bucket. XP 1-3 on player kills; 25% chance (+1% per Looting level) to drop a bone.

Methods ​

entityBaseTick() protected ​

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

getAvoidDistance() protected ​

php
protected function getAvoidDistance() : float

Distance at which the fish flees from players and axolotls (Bedrock avoid_mob_type max_dist).

getDrops() ​

php
public function getDrops() : array

getFishDrops() protected ​

php
abstract protected function getFishDrops() : array

getXpDropAmount() ​

php
public function getXpDropAmount() : int

initEntity() protected ​

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

onInteractWithItem() protected ​

php
protected function onInteractWithItem(\pocketmine\player\Player $player, \pocketmine\item\Item $item) : bool

playAmbientSound() protected ​

php
protected function playAmbientSound() : void

registerGoals() protected ​

php
protected function registerGoals() : void

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