OminousItemSpawner 5.47.0
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 = 120SPAWN_ITEM_DELAY_MIN
php
public const SPAWN_ITEM_DELAY_MIN = 60TICKS_BEFORE_ABOUT_TO_SPAWN_SOUND
php
public const TICKS_BEFORE_ABOUT_TO_SPAWN_SOUND = 36Methods
__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) : voidcanBeCollidedWith()
php
public function canBeCollidedWith() : boolcanBeMovedByCurrents()
php
public function canBeMovedByCurrents() : boolentityBaseTick() protected
php
protected function entityBaseTick(int $tickDiff = 1) : boolgetInitialDragMultiplier() protected
php
protected function getInitialDragMultiplier() : floatgetInitialGravity() protected
php
protected function getInitialGravity() : floatgetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetItem()
php
public function getItem() : \pocketmine\item\ItemThe item it will release (a copy).
getNetworkTypeId()
php
public static function getNetworkTypeId() : stringgetSpawnItemAfterTicks()
php
public function getSpawnItemAfterTicks() : intTicks after its creation at which it releases the item.
hasMovementUpdate()
php
public function hasMovementUpdate() : boolinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidsaveNBT()
php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTag