Drowned 5.46.0
Extends Zombie
Bedrock values (drowned.json): 20 health, movement 0.23, attack 3, swims in water, burns in daylight, breathes underwater. 6.25% spawn with a trident and throw it (every 1-3 seconds, within 10 blocks) when the target is more than 3 blocks away; 3.75% hold a fishing rod and 8% a nautilus shell in the off hand (always dropped). Targets players in water or at night within 20 blocks. Loot: 0-2 rotten flesh (+0-1 per Looting level); 11% (+2% per Looting level) copper ingot when killed by a player.
Constants
SWIM_SPEED
php
public const SWIM_SPEED = 0.15TRIDENT_RANGE
php
public const TRIDENT_RANGE = 10.0Methods
burnsInDaylight()
php
public function burnsInDaylight() : boolcanBreathe()
php
public function canBreathe() : boolcanHunt()
php
public function canHunt(\pocketmine\player\Player $player) : boolDrowned only go after players who are in water, or anyone at night.
destroyCycles() protected
php
protected function destroyCycles() : voidgetDrops()
php
public function getDrops() : arraygetName()
php
public function getName() : stringgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringgetPickedItem()
php
public function getPickedItem() : ?\pocketmine\item\ItemgetSwimControl()
php
public function getSwimControl() : \pocketmine\entity\ai\hostile\FreeMoveControlgetXpDropAmount()
php
public function getXpDropAmount() : inthasTrident()
php
public function hasTrident() : boolinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidregisterGoals() protected
php
protected function registerGoals() : voidsaveNBT()
php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagthrowTrident()
php
public function throwTrident(\pocketmine\entity\Living $target, float $distance) : voidtryChangeMovement() protected
php
protected function tryChangeMovement() : void