Skip to content

OminousItemSpawner 5.47.0 ​

class · pocketmine\entity\object\OminousItemSpawner · source

Extends Entity

Ominous item spawner (minecraft:ominous_item_spawner, vanilla OminousItemSpawner): created by ominous trial spawners above the players and mobs of the fight, it holds one item and releases it after 60 to 120 ticks (with a warning sound 36 ticks before), then vanishes. Arrows, potions and charges are shot straight down, other items dropped. It cannot be hurt and doesn't move: its tick is only a countdown.

Constants ​

SPAWN_ITEM_DELAY_MAX ​

php
public const SPAWN_ITEM_DELAY_MAX = 120

SPAWN_ITEM_DELAY_MIN ​

php
public const SPAWN_ITEM_DELAY_MIN = 60

TICKS_BEFORE_ABOUT_TO_SPAWN_SOUND ​

php
public const TICKS_BEFORE_ABOUT_TO_SPAWN_SOUND = 36

Methods ​

__construct() ​

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

attack() ​

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

canBeCollidedWith() ​

php
public function canBeCollidedWith() : bool

canBeMovedByCurrents() ​

php
public function canBeMovedByCurrents() : bool

entityBaseTick() protected ​

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

getInitialDragMultiplier() protected ​

php
protected function getInitialDragMultiplier() : float

getInitialGravity() protected ​

php
protected function getInitialGravity() : float

getInitialSizeInfo() protected ​

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

getItem() ​

php
public function getItem() : \pocketmine\item\Item

The item it will release (a copy).

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getSpawnItemAfterTicks() ​

php
public function getSpawnItemAfterTicks() : int

Ticks after its creation at which it releases the item.

hasMovementUpdate() ​

php
public function hasMovementUpdate() : bool

initEntity() protected ​

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

saveNBT() ​

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

VanillaMine is a fork of PocketMine-MP. Not affiliated with the PMMP team or Mojang.