Slime 5.46.0
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 $slimeSizeMethods
__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) : floatcreateChild() protected
php
protected function createChild(\pocketmine\entity\Location $location, int $size) : \pocketmine\entity\monster\SlimedestroyCycles() protected
php
protected function destroyCycles() : voidentityBaseTick() protected
php
protected function entityBaseTick(int $tickDiff = 1) : boolgetAggressiveJumpDelay() protected
php
protected function getAggressiveJumpDelay() : arraygetCalmJumpDelay() protected
php
protected function getCalmJumpDelay() : arraygetContactDamage()
php
public function getContactDamage() : floatDamage dealt to the players it touches (0 for small slimes).
getDrops()
php
public function getDrops() : arraygetHopControl()
php
public function getHopControl() : \pocketmine\entity\ai\hostile\HopControlgetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetJumpVelocityForHop() protected
php
protected function getJumpVelocityForHop() : floatgetMaxHealthForSize() protected
php
protected function getMaxHealthForSize() : intgetName()
php
public function getName() : stringgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringgetPickedItem()
php
public function getPickedItem() : ?\pocketmine\item\ItemgetSlimeSize()
php
public function getSlimeSize() : intgetSpeedForSize() protected
php
protected function getSpeedForSize() : floatgetXpDropAmount()
php
public function getXpDropAmount() : inthasMovementUpdate()
php
public function hasMovementUpdate() : boolinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidonDeath() protected
php
protected function onDeath() : voidregisterGoals() protected
php
protected function registerGoals() : voidsaveNBT()
php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsplit()
php
public function split() : arraySplits 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) : voidtryChangeMovement() protected
php
protected function tryChangeMovement() : void