SnowGolem 5.46.0
Extends Mob
Bedrock values (entities/snow_golem.json): 4 health, 0.4x1.8, movement 0.2. Throws a snowball every second at monsters within 6 blocks (shooting range 10, 1.25x). Leaves a trail of snow layers in biomes colder than 0.81, and takes 1 damage per second in biomes warmer than 1.0 and in water or rain. Shears take its pumpkin off (SHEARED, drops a carved pumpkin). Loot (loot_tables/entities/snowman.json): 0-15 snowballs.
Constants
TAG_SHEARED
php
public const TAG_SHEARED = "Sheared"Methods
canBeLeashed()
php
public function canBeLeashed() : boolcanFreeze()
php
public function canFreeze() : boolentityBaseTick() protected
php
protected function entityBaseTick(int $tickDiff = 1) : boolgetDrops()
php
public function getDrops() : arraygetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
php
public function getName() : stringgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisSheared()
php
public function isSheared() : boolonInteractWithItem() protected
php
protected function onInteractWithItem(\pocketmine\player\Player $player, \pocketmine\item\Item $item) : boolregisterGoals() protected
php
protected function registerGoals() : voidsaveNBT()
php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetSheared()
php
public function setSheared(bool $sheared) : voidsyncNetworkData() protected
php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : voidthrowSnowball()
php
public function throwSnowball(\pocketmine\entity\Living $target, float $distance) : void