Skip to content

Painting ​

class · pocketmine\entity\object\Painting · source

Extends Entity

Constants ​

DATA_TO_FACING ​

php
public const DATA_TO_FACING = [0 => \pocketmine\math\Facing::SOUTH, 1 => \pocketmine\math\Facing::WEST, 2 => \pocketmine\math\Facing::NORTH, 3 => \pocketmine\math\Facing::EAST]

TAG_DIRECTION_BE ​

php
public const TAG_DIRECTION_BE = "Direction"

TAG_FACING_JE ​

php
public const TAG_FACING_JE = "Facing"

TAG_MOTIVE ​

php
public const TAG_MOTIVE = "Motive"

TAG_TILE_X ​

php
public const TAG_TILE_X = "TileX"

TAG_TILE_Y ​

php
public const TAG_TILE_Y = "TileY"

TAG_TILE_Z ​

php
public const TAG_TILE_Z = "TileZ"

Properties ​

$blockIn protected ​

php
protected \pocketmine\math\Vector3 $blockIn

$facing protected ​

php
protected int $facing

$motive protected ​

php
protected \pocketmine\entity\object\PaintingMotive $motive

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Location $location, \pocketmine\math\Vector3 $blockIn, int $facing, \pocketmine\entity\object\PaintingMotive $motive, ?\pocketmine\nbt\tag\CompoundTag $nbt = null)

canBeCollidedWith() ​

php
public function canBeCollidedWith() : bool

canFit() ​

php
public static function canFit(\pocketmine\world\World $world, \pocketmine\math\Vector3 $blockIn, int $facing, bool $checkOverlap, \pocketmine\entity\object\PaintingMotive $motive) : bool

Returns whether a painting with the specified motive can be placed at the given position.

getFacing() ​

php
public function getFacing() : int

getInitialDragMultiplier() protected ​

php
protected function getInitialDragMultiplier() : float

getInitialGravity() protected ​

php
protected function getInitialGravity() : float

getInitialSizeInfo() protected ​

php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfo

getMotive() ​

php
public function getMotive() : \pocketmine\entity\object\PaintingMotive

Returns the painting motive (which image is displayed on the painting)

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getPickedItem() ​

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

hasMovementUpdate() ​

php
public function hasMovementUpdate() : bool

initEntity() protected ​

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

onDeath() protected ​

php
protected function onDeath() : void

onNearbyBlockChange() ​

php
public function onNearbyBlockChange() : void

onRandomUpdate() ​

php
public function onRandomUpdate() : void

recalculateBoundingBox() protected ​

php
protected function recalculateBoundingBox() : void

saveNBT() ​

php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTag

sendSpawnPacket() protected ​

php
protected function sendSpawnPacket(\pocketmine\player\Player $player) : void

updateMovement() protected ​

php
protected function updateMovement(bool $teleport = false) : void

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