Skip to content

Enderman 5.46.0 ​

class · pocketmine\entity\monster\Enderman · source

Extends Monster
Implements Angerable

Bedrock values (enderman.json): 40 health, 0.6x2.9, movement 0.3 (0.45 angry), attack 7, follow range 64.

  • Becomes angry for 25 seconds at a player staring at its eyes (within 64 blocks, not wearing a carved pumpkin, for 0.25 seconds; Java stare cone: cosine > 1 - 0.025 / distance) or at whoever hurts it; hunts endermites.
  • Teleports (minecraft:teleport): randomly within 32 blocks when hit by a projectile (which doesn't hurt it), when hurt by something that isn't a mob (90%), in water, randomly in daylight, when its target is more than 16 blocks away (5% per tick, towards it) and when a staring target comes within 4 blocks.
  • Hurt by water and rain (1 damage per 10 ticks in contact with them), which makes it teleport away.
  • Picks up (5% per second) and places down (0.05% per tick) dirt, sand, flowers and other holdable blocks. Loot: 0-1 ender pearl (+0-1 per Looting level), and the carried block. Experience 5.

Constants ​

ANGER_TICKS ​

php
public const ANGER_TICKS = 500

ATTACK_DAMAGE ​

php
public const ATTACK_DAMAGE = 7.0

HOLDABLE_BLOCKS ​

php
public const HOLDABLE_BLOCKS = [\pocketmine\block\BlockTypeIds::GRASS, \pocketmine\block\BlockTypeIds::DIRT, \pocketmine\block\BlockTypeIds::PODZOL, \pocketmine\block\BlockTypeIds::MYCELIUM, \pocketmine\block\BlockTypeIds::MOSS_BLOCK, \pocketmine\block\BlockTypeIds::PALE_MOSS_BLOCK, \pocketmine\block\BlockTypeIds::MUD, \pocketmine\block\BlockTypeIds::MUDDY_MANGROVE_ROOTS, \pocketmine\block\BlockTy …

STARE_TICKS ​

php
public const STARE_TICKS = 5

TAG_CARRIED_BLOCK ​

php
public const TAG_CARRIED_BLOCK = "carriedBlock"

TARGET_TELEPORT_DISTANCE ​

php
public const TARGET_TELEPORT_DISTANCE = 16.0

TELEPORT_RANGE ​

php
public const TELEPORT_RANGE = 32

Methods ​

attack() ​

php
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : void

entityBaseTick() protected ​

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

findTeleportDestination() ​

php
public function findTeleportDestination(float $x, float $y, float $z) : ?\pocketmine\math\Vector3

Returns where the enderman would land if it teleported to the given point (vanilla EnderMan::teleport and LivingEntity::randomTeleport): straight down to the first block it can stand on, which must not be a liquid, with room for its whole body and no liquid around it. Returns null if it can't go there.

getCarriedBlock() ​

php
public function getCarriedBlock() : ?\pocketmine\block\Block

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

onAngerChange() protected ​

php
protected function onAngerChange(bool $angry) : void

registerGoals() protected ​

php
protected function registerGoals() : void

saveNBT() ​

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

setCarriedBlock() ​

php
public function setCarriedBlock(?\pocketmine\block\Block $block) : void

syncNetworkData() protected ​

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

teleportRandomly() ​

php
public function teleportRandomly(int $tries = 16) : bool

Tries to teleport to a random spot within 32 blocks (vanilla: 64x64x64 cube). Returns whether it moved.

teleportTo() ​

php
public function teleportTo(float $x, float $y, float $z) : bool

Teleports to the given point if possible (see Enderman::findTeleportDestination()).

teleportTowards() ​

php
public function teleportTowards(\pocketmine\entity\Living $entity, int $tries = 8) : bool

Teleports to a spot near the entity, on the enderman's side (vanilla teleportTowards).

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