Skip to content

Witch 5.46.0 ​

class · pocketmine\entity\monster\Witch · source

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 ​

php
public const ATTACK_RANGE = 10.0

DRINK_TICKS ​

php
public const DRINK_TICKS = 32

Methods ​

choosePotion() ​

php
public function choosePotion(\pocketmine\entity\Living $target) : \pocketmine\item\PotionType

Picks the potion to throw at the target (vanilla shooter "projectiles" filters of witch.json).

entityBaseTick() protected ​

php
protected function entityBaseTick(int $tickDiff = 1) : bool

getDrops() ​

php
public function getDrops() : array

getInitialSizeInfo() protected ​

php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfo

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getPickedItem() ​

php
public function getPickedItem() : ?\pocketmine\item\Item

getXpDropAmount() ​

php
public function getXpDropAmount() : int

initEntity() protected ​

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

isDrinking() ​

php
public function isDrinking() : bool

isRaidVictim() ​

php
public function isRaidVictim(\pocketmine\entity\Living $entity) : bool

Witches in a raid leave villagers alone but attack iron golems (Bedrock).

pickPotionToDrink() protected ​

php
protected function pickPotionToDrink() : ?\pocketmine\item\PotionType

Returns the potion the witch wants to drink now, if any (vanilla behavior.drink_potion of witch.json).

registerGoals() protected ​

php
protected function registerGoals() : void

saveNBT() ​

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

startDrinking() ​

php
public function startDrinking(\pocketmine\item\PotionType $potion) : void

syncNetworkData() protected ​

php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void

throwPotion() ​

php
public function throwPotion(\pocketmine\entity\Living $target, float $distance) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.