DecoratedPot 5.46.0
Extends Transparent
Implements HorizontalFacing
Decorated pot. The pattern on each side and the stored items are kept in the block entity.
- Using an item on it stores one item (one stack of a single item type at most) and makes the pot wobble.
- Broken with a sword, axe, pickaxe, shovel, hoe or trident (vanilla #breaks_decorated_pots), or hit by a projectile, it shatters into its sherds (bricks for plain sides). Broken by hand, with any other item or with silk touch, it drops itself with its sherds. The stored items always drop.
Methods
asItemWithSherds()
php
public function asItemWithSherds(array $sherds) : \pocketmine\item\ItemReturns a decorated pot item with the given sherds (vanilla stores them at the root of the item tag).
getDropsForCompatibleTool()
php
public function getDropsForCompatibleTool(\pocketmine\item\Item $item) : arraygetPickedItem()
php
public function getPickedItem(bool $addUserData = false) : \pocketmine\item\ItemgetSherds()
php
public function getSherds() : arraygetSilkTouchDrops()
php
public function getSilkTouchDrops(\pocketmine\item\Item $item) : arraygetSupportType()
php
public function getSupportType(int $facing) : \pocketmine\block\utils\SupportTypeonBreak()
php
public function onBreak(\pocketmine\item\Item $item, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolonInteract()
php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolonProjectileHit()
php
public function onProjectileHit(\pocketmine\entity\projectile\Projectile $projectile, \pocketmine\math\RayTraceResult $hitResult) : voidplace()
php
public function place(\pocketmine\world\BlockTransaction $tx, \pocketmine\item\Item $item, \pocketmine\block\Block $blockReplace, \pocketmine\block\Block $blockClicked, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null) : boolrecalculateCollisionBoxes() protected
php
protected function recalculateCollisionBoxes() : array