Skip to content

Salmon 5.46.0 ​

class · pocketmine\entity\aquatic\Salmon · source

Extends AbstractFish

Bedrock values (entities/salmon.json): 3 health, 0.5x0.5, underwater speed 0.12, flees players within 3 blocks. Three sizes (1.21.50+): small (scale 0.5, weight 30), normal (1, 50), large (1.5, 15). Loot (salmon_normal / salmon_large): 1 raw salmon (cooked when burning), 25% bone (1-2 when large).

Constants ​

SIZE_LARGE ​

php
public const SIZE_LARGE = 2

SIZE_NORMAL ​

php
public const SIZE_NORMAL = 1

SIZE_SMALL ​

php
public const SIZE_SMALL = 0

Methods ​

applyBucketData() ​

php
public function applyBucketData(\pocketmine\nbt\tag\CompoundTag $tag) : void

getAvoidDistance() protected ​

php
protected function getAvoidDistance() : float

getBucketItem() protected ​

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

getDrops() ​

php
public function getDrops() : array

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

getSizeVariant() ​

php
public function getSizeVariant() : int

getSwimSpeed() protected ​

php
protected function getSwimSpeed() : float

initEntity() protected ​

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

randomSize() ​

php
public static function randomSize() : int

saveNBT() ​

php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTag

setSizeVariant() ​

php
public function setSizeVariant(int $size) : void

writeBucketData() protected ​

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

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