Skip to content

TropicalFish 5.46.0 ​

class · pocketmine\entity\aquatic\TropicalFish · source

Extends AbstractFish

Bedrock values (entities/tropicalfish.json): 3 health, 0.4x0.4 at scale 1.3, underwater speed 0.12. Appearance: body shape (VARIANT 0-1), pattern (MARK_VARIANT 0-5), base colour (COLOR) and pattern colour (COLOR_2), dye colour IDs 0-14 except black. Spawned fish are one of the 22 named varieties 90% of the time (Java: same ratio; the Bedrock behaviour pack lists the same 22 presets), otherwise fully random. Loot (loot_tables/entities/tropicalfish.json): 1 tropical fish, 25% bone.

Constants ​

PRESETS ​

php
public const PRESETS = ["anemone" => [1, 7, 1, 1], "clownfish" => [1, 0, 0, 0], "black_tang" => [7, 7, 0, 1], "cc_betta" => [6, 3, 5, 0], "dog_fish" => [10, 4, 3, 1], "blue_dory" => [7, 3, 1, 0], "butterfly_fish" => [0, 7, 4, 0], "cichlid" => [11, 7, 1, 0], "e_red_snapper" => [0, 14, 5, 1], "goat_fish" => [0, 4, 5, 0], "moorish_idol" => [0, 7, 2, 1], "ornate_butterfly" => [0, 1, 5, 1], "red_snappe …

Named varieties: [base colour, pattern colour, pattern, shape], from the behaviour pack component groups.

Methods ​

applyBucketData() ​

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

getBaseColor() ​

php
public function getBaseColor() : int

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

getPattern() ​

php
public function getPattern() : int

getPatternColor() ​

php
public function getPatternColor() : int

getShape() ​

php
public function getShape() : int

getSwimSpeed() protected ​

php
protected function getSwimSpeed() : float

initEntity() protected ​

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

randomizeAppearance() ​

php
public function randomizeAppearance() : void

saveNBT() ​

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

setAppearance() ​

php
public function setAppearance(int $shape, int $pattern, int $baseColor, int $patternColor) : void

syncNetworkData() protected ​

php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : 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.