Salmon 5.46.0
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 = 2SIZE_NORMAL
php
public const SIZE_NORMAL = 1SIZE_SMALL
php
public const SIZE_SMALL = 0Methods
applyBucketData()
php
public function applyBucketData(\pocketmine\nbt\tag\CompoundTag $tag) : voidgetAvoidDistance() protected
php
protected function getAvoidDistance() : floatgetBucketItem() protected
php
protected function getBucketItem() : \pocketmine\item\ItemgetDrops()
php
public function getDrops() : arraygetFishDrops() protected
php
protected function getFishDrops() : arraygetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
php
public function getName() : stringgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringgetSizeVariant()
php
public function getSizeVariant() : intgetSwimSpeed() protected
php
protected function getSwimSpeed() : floatinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidrandomSize()
php
public static function randomSize() : intsaveNBT()
php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetSizeVariant()
php
public function setSizeVariant(int $size) : voidwriteBucketData() protected
php
protected function writeBucketData(\pocketmine\nbt\tag\CompoundTag $tag) : void