Skip to content

DecoratedPot 5.46.0 ​

class · pocketmine\block\DecoratedPot · source

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\Item

Returns 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) : array

getPickedItem() ​

php
public function getPickedItem(bool $addUserData = false) : \pocketmine\item\Item

getSherds() ​

php
public function getSherds() : array

getSilkTouchDrops() ​

php
public function getSilkTouchDrops(\pocketmine\item\Item $item) : array

getSupportType() ​

php
public function getSupportType(int $facing) : \pocketmine\block\utils\SupportType

onBreak() ​

php
public function onBreak(\pocketmine\item\Item $item, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

onInteract() ​

php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

onProjectileHit() ​

php
public function onProjectileHit(\pocketmine\entity\projectile\Projectile $projectile, \pocketmine\math\RayTraceResult $hitResult) : void

place() ​

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) : bool

recalculateCollisionBoxes() protected ​

php
protected function recalculateCollisionBoxes() : array

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.