Skip to content

SulfurCubeBucket 5.47.0 ​

class · pocketmine\item\SulfurCubeBucket · source

Extends UnstackableItem

Bucket of Sulfur Cube (a sulfur cube picked up with an empty bucket). Unlike the buckets of aquatic mobs it holds no water: using it on a block releases the cube (with the age, health and block saved on the bucket, see BucketableMob) and leaves an empty bucket.

Methods ​

onInteractBlock() ​

php
public function onInteractBlock(\pocketmine\player\Player $player, \pocketmine\block\Block $blockReplace, \pocketmine\block\Block $blockClicked, int $face, \pocketmine\math\Vector3 $clickVector, array &$returnedItems) : \pocketmine\item\ItemUseResult

releaseMob() ​

php
public function releaseMob(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos) : ?\pocketmine\entity\Entity

Spawns the cube of this bucket at the given position. Returns it, or null if no sulfur cube is registered.

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