Witch 5.46.0
Extends Monster
Implements Raider
Bedrock values (witch.json): 26 health, movement 0.25, throws a splash potion every 3 seconds within 10 blocks: Slowness at 8+ blocks, Poison if the target has 8+ health, Weakness (25%) within 3 blocks, Harming otherwise. Drinks (32 ticks, 25% slower meanwhile) Water Breathing underwater (15%), Fire Resistance when burning (15%), Healing when hurt (5%), Swiftness when its target is 11+ blocks away (25%). Loot: 1-3 rolls of 0-2 glowstone dust, sugar, spider eye, glass bottle, gunpowder or sticks, 4-8 redstone (+0-1 each per Looting level).
Constants
ATTACK_RANGE
public const ATTACK_RANGE = 10.0DRINK_TICKS
public const DRINK_TICKS = 32Methods
choosePotion()
public function choosePotion(\pocketmine\entity\Living $target) : \pocketmine\item\PotionTypePicks the potion to throw at the target (vanilla shooter "projectiles" filters of witch.json).
entityBaseTick() protected
protected function entityBaseTick(int $tickDiff = 1) : boolgetDrops()
public function getDrops() : arraygetInitialSizeInfo() protected
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
public function getName() : stringgetNetworkTypeId()
public static function getNetworkTypeId() : stringgetPickedItem()
public function getPickedItem() : ?\pocketmine\item\ItemgetXpDropAmount()
public function getXpDropAmount() : intinitEntity() protected
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisDrinking()
public function isDrinking() : boolisRaidVictim()
public function isRaidVictim(\pocketmine\entity\Living $entity) : boolWitches in a raid leave villagers alone but attack iron golems (Bedrock).
pickPotionToDrink() protected
protected function pickPotionToDrink() : ?\pocketmine\item\PotionTypeReturns the potion the witch wants to drink now, if any (vanilla behavior.drink_potion of witch.json).
registerGoals() protected
protected function registerGoals() : voidsaveNBT()
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagstartDrinking()
public function startDrinking(\pocketmine\item\PotionType $potion) : voidsyncNetworkData() protected
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : voidthrowPotion()
public function throwPotion(\pocketmine\entity\Living $target, float $distance) : void