ItemFrame
Extends Flowable
Implements AnyFacing
Constants
ROTATIONS
php
public const ROTATIONS = 8Properties
$framedItem protected
php
protected ?\pocketmine\item\Item $framedItem$hasMap protected
php
protected bool $hasMap$itemDropChance protected
php
protected float $itemDropChance$itemRotation protected
php
protected int $itemRotationMethods
describeBlockOnlyState() protected
php
protected function describeBlockOnlyState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : voidgetDropsForCompatibleTool()
php
public function getDropsForCompatibleTool(\pocketmine\item\Item $item) : arraygetFramedItem()
php
public function getFramedItem() : ?\pocketmine\item\ItemgetItemDropChance()
php
public function getItemDropChance() : floatgetItemRotation()
php
public function getItemRotation() : intgetPickedItem()
php
public function getPickedItem(bool $addUserData = false) : \pocketmine\item\ItemhasMap()
php
public function hasMap() : boolonAttack()
php
public function onAttack(\pocketmine\item\Item $item, int $face, ?\pocketmine\player\Player $player = null) : boolonInteract()
php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolonNearbyBlockChange()
php
public function onNearbyBlockChange() : 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) : boolreadStateFromWorld()
php
public function readStateFromWorld() : \pocketmine\block\BlocksetFramedItem()
php
public function setFramedItem(?\pocketmine\item\Item $item) : selfsetHasMap()
php
public function setHasMap(bool $hasMap) : selfThis can be set irrespective of whether the frame actually contains a map or not. When set, the frame stretches to the edges of the block without leaving space around the edges.
setItemDropChance()
php
public function setItemDropChance(float $itemDropChance) : selfsetItemRotation()
php
public function setItemRotation(int $itemRotation) : selfwriteStateToWorld()
php
public function writeStateToWorld() : void