Skip to content

Slime 5.46.0 ​

class · pocketmine\entity\monster\Slime · source

Extends Monster

Bedrock values (slime.json): sizes 1, 2 and 4 (VARIANT, which the client scales the model by), random on spawn. Size 4: 16 health, 2.08 blocks, movement 0.6, 4 damage; size 2: 4 health, 1.04, 0.4, 2 damage; size 1: 1 health, 0.52, 0.3, harmless. Hops every 0.5-1.5 seconds (0.16-0.5 with a target), hurts the players it touches (area_attack, 0.15 blocks beyond its box, every 0.5 seconds), splits into 2-4 slimes of half its size when it dies. Experience: its size. Loot (size 1 only): 0-2 slimeballs (+0-1 per Looting level).

Constants ​

SIZES ​

php
public const SIZES = [1, 2, 4]

TAG_SIZE ​

php
public const TAG_SIZE = "Size"

TAG_VARIANT ​

php
public const TAG_VARIANT = "Variant"

Properties ​

$hop protected ​

php
protected \pocketmine\entity\ai\hostile\HopControl $hop

$slimeSize protected ​

php
protected int $slimeSize

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Location $location, ?\pocketmine\nbt\tag\CompoundTag $nbt = null, ?int $size = null)

calculateFallDamage() protected ​

php
protected function calculateFallDamage(float $fallDistance) : float

createChild() protected ​

php
protected function createChild(\pocketmine\entity\Location $location, int $size) : \pocketmine\entity\monster\Slime

destroyCycles() protected ​

php
protected function destroyCycles() : void

entityBaseTick() protected ​

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

getAggressiveJumpDelay() protected ​

php
protected function getAggressiveJumpDelay() : array

getCalmJumpDelay() protected ​

php
protected function getCalmJumpDelay() : array

getContactDamage() ​

php
public function getContactDamage() : float

Damage dealt to the players it touches (0 for small slimes).

getDrops() ​

php
public function getDrops() : array

getHopControl() ​

php
public function getHopControl() : \pocketmine\entity\ai\hostile\HopControl

getInitialSizeInfo() protected ​

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

getJumpVelocityForHop() protected ​

php
protected function getJumpVelocityForHop() : float

getMaxHealthForSize() protected ​

php
protected function getMaxHealthForSize() : int

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getPickedItem() ​

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

getSlimeSize() ​

php
public function getSlimeSize() : int

getSpeedForSize() protected ​

php
protected function getSpeedForSize() : float

getXpDropAmount() ​

php
public function getXpDropAmount() : int

hasMovementUpdate() ​

php
public function hasMovementUpdate() : bool

initEntity() protected ​

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

onDeath() protected ​

php
protected function onDeath() : void

registerGoals() protected ​

php
protected function registerGoals() : void

saveNBT() ​

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

split() ​

php
public function split() : array

Splits the dead slime into 2-4 slimes of half its size.

syncNetworkData() protected ​

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

tryChangeMovement() protected ​

php
protected function tryChangeMovement() : void

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