TropicalFish 5.46.0
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) : voidgetBaseColor()
php
public function getBaseColor() : intgetBucketItem() 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() : stringgetPattern()
php
public function getPattern() : intgetPatternColor()
php
public function getPatternColor() : intgetShape()
php
public function getShape() : intgetSwimSpeed() protected
php
protected function getSwimSpeed() : floatinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidrandomizeAppearance()
php
public function randomizeAppearance() : voidsaveNBT()
php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetAppearance()
php
public function setAppearance(int $shape, int $pattern, int $baseColor, int $patternColor) : voidsyncNetworkData() protected
php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : voidwriteBucketData() protected
php
protected function writeBucketData(\pocketmine\nbt\tag\CompoundTag $tag) : void