Skip to content

DecoratedPot 5.46.0 ​

class · pocketmine\block\tile\DecoratedPot · source

Extends Spawnable

Decorated pot block entity: the pattern on each of the 4 sides and the stack of items stored inside. The vanilla "sherds" tag lists the item used for each side as [back, left, right, front]; "minecraft:brick" (or a missing/empty entry) means a plain side. The same tag is used at the root of the decorated pot item.

Constants ​

ANIMATION_NONE ​

php
public const ANIMATION_NONE = 0

ANIMATION_WOBBLE_FAIL ​

php
public const ANIMATION_WOBBLE_FAIL = 1

ANIMATION_WOBBLE_SUCCESS ​

php
public const ANIMATION_WOBBLE_SUCCESS = 2

SIDE_BACK ​

php
public const SIDE_BACK = 0

SIDE_FRONT ​

php
public const SIDE_FRONT = 3

SIDE_LEFT ​

php
public const SIDE_LEFT = 1

SIDE_RIGHT ​

php
public const SIDE_RIGHT = 2

TAG_ANIMATION ​

php
public const TAG_ANIMATION = "animation"

TAG_ITEM ​

php
public const TAG_ITEM = "item"

TAG_SHERDS ​

php
public const TAG_SHERDS = "sherds"

Methods ​

addAdditionalSpawnData() protected ​

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

copyDataFromItem() ​

php
public function copyDataFromItem(\pocketmine\item\Item $item) : void

createAnimationPacket() ​

php
public function createAnimationPacket(int $animation) : \pocketmine\network\mcpe\protocol\BlockActorDataPacket

Creates the packet that makes clients play the wobble animation of the pot.

getCleanedNBT() ​

php
public function getCleanedNBT() : ?\pocketmine\nbt\tag\CompoundTag

getItem() ​

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

getSherds() ​

php
public function getSherds() : array

hasDecorations() ​

php
public static function hasDecorations(array $sherds) : bool

idToSherd() ​

php
public static function idToSherd(string $id) : ?\pocketmine\item\PotterySherdType

readSaveData() ​

php
public function readSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void

readSherds() ​

php
public static function readSherds(\pocketmine\nbt\tag\CompoundTag $nbt) : array

setItem() ​

php
public function setItem(?\pocketmine\item\Item $item) : void

setSherds() ​

php
public function setSherds(array $sherds) : void

sherdToId() ​

php
public static function sherdToId(?\pocketmine\item\PotterySherdType $type) : string

writeSaveData() protected ​

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

writeSherds() ​

php
public static function writeSherds(\pocketmine\nbt\tag\CompoundTag $nbt, array $sherds) : void

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