PocketMine-MP 5.32.2 git-1ebd7d3960d713d56f77f610fe0c15cdee201069
Loading...
Searching...
No Matches
pocketmine\block\tile\HangingSign Class Reference
+ Inheritance diagram for pocketmine\block\tile\HangingSign:
+ Collaboration diagram for pocketmine\block\tile\HangingSign:

Public Member Functions

 clearSpawnCompoundCache ()
 
 close ()
 
 copyDataFromItem (Item $item)
 
 getBlock ()
 
 getCleanedNBT ()
 
 getEditorEntityRuntimeId ()
 
 getPosition ()
 
 getRenderUpdateBugWorkaroundStateProperties (Block $block)
 
 getSerializedSpawnCompound ()
 
 getSpawnCompound ()
 
 getText ()
 
 isClosed ()
 
 isWaxed ()
 
 onBlockDestroyed ()
 
 readSaveData (CompoundTag $nbt)
 
 saveNBT ()
 
 setEditorEntityRuntimeId (?int $editorEntityRuntimeId)
 
 setText (SignText $text)
 
 setWaxed (bool $waxed)
 

Public Attributes

bool $closed = false
 
const TAG_BACK_TEXT = "BackText"
 
const TAG_FRONT_TEXT = "FrontText"
 
const TAG_GLOWING_TEXT = "IgnoreLighting"
 
const TAG_ID = "id"
 
const TAG_LEGACY_BUG_RESOLVE = "TextIgnoreLegacyBugResolved"
 
const TAG_LOCKED_FOR_EDITING_BY = "LockedForEditingBy"
 
const TAG_PERSIST_FORMATTING = "PersistFormatting"
 
const TAG_TEXT_BLOB = "Text"
 
const TAG_TEXT_COLOR = "SignTextColor"
 
const TAG_TEXT_LINE = "Text%d"
 
const TAG_WAXED = "IsWaxed"
 
const TAG_X = "x"
 
const TAG_Y = "y"
 
const TAG_Z = "z"
 

Protected Member Functions

 addAdditionalSpawnData (CompoundTag $nbt)
 
 onBlockDestroyedHook ()
 
 writeSaveData (CompoundTag $nbt)
 

Protected Attributes

int $editorEntityRuntimeId = null
 
Position $position
 
SignText $text
 
TimingsHandler $timings
 

Detailed Description

Deprecated

Definition at line 29 of file block/tile/HangingSign.php.

Member Function Documentation

◆ addAdditionalSpawnData()

pocketmine\block\tile\Sign::addAdditionalSpawnData ( CompoundTag $nbt)
protectedinherited

An extension to getSpawnCompound() for further modifying the generic tile NBT.

Reimplemented from pocketmine\block\tile\Spawnable.

Definition at line 152 of file Sign.php.

◆ clearSpawnCompoundCache()

pocketmine\block\tile\Spawnable::clearSpawnCompoundCache ( )
inherited

Definition at line 38 of file Spawnable.php.

◆ close()

pocketmine\block\tile\Tile::close ( )
inherited

Definition at line 129 of file Tile.php.

◆ copyDataFromItem()

pocketmine\block\tile\Tile::copyDataFromItem ( Item $item)
inherited

Definition at line 92 of file Tile.php.

◆ getBlock()

pocketmine\block\tile\Tile::getBlock ( )
inherited

Definition at line 98 of file Tile.php.

◆ getCleanedNBT()

pocketmine\block\tile\Tile::getCleanedNBT ( )
inherited

Definition at line 82 of file Tile.php.

◆ getEditorEntityRuntimeId()

pocketmine\block\tile\Sign::getEditorEntityRuntimeId ( )
inherited

Returns the entity runtime ID of the player who placed this sign. Only the player whose entity ID matches this one may edit the sign text. This is needed because as of 1.16.220, there is still no reliable way to detect when the MCPE client closed the sign edit GUI, so we have no way to know when the text is finalized. This limits editing of the text to only the player who placed it, and only while that player is online. We can say for sure that the sign is finalized if either of the following occurs:

  • The player quits (after rejoin, the player's entity runtimeID will be different).
  • The chunk is unloaded (on next load, the entity runtimeID will be null, because it's not saved).

Definition at line 146 of file Sign.php.

◆ getPosition()

pocketmine\block\tile\Tile::getPosition ( )
inherited

Definition at line 102 of file Tile.php.

◆ getRenderUpdateBugWorkaroundStateProperties()

pocketmine\block\tile\Spawnable::getRenderUpdateBugWorkaroundStateProperties ( Block $block)
inherited

The Bedrock client won't re-render a block if the block's state properties didn't change. This is a problem when the tile may affect the block's appearance. For example, a cauldron's liquid changes colour based on the dye inside.

This is worked around in vanilla by modifying one of the block's state properties to a different value, and then changing it back again. Since we don't want to litter core implementation with hacks like this, we brush it under the rug into Tile.

Returns
ByteTag[]|IntTag[]|StringTag[] @phpstan-return array<string, IntTag|StringTag|ByteTag>

Reimplemented in pocketmine\block\tile\Cauldron, and pocketmine\block\tile\FlowerPot.

Definition at line 54 of file Spawnable.php.

◆ getSerializedSpawnCompound()

pocketmine\block\tile\Spawnable::getSerializedSpawnCompound ( )
finalinherited

Returns encoded NBT (varint, little-endian) used to spawn this tile to clients. Uses cache where possible, populates cache if it is null.

@phpstan-return CacheableNbt<CompoundTag>

Definition at line 64 of file Spawnable.php.

◆ getSpawnCompound()

pocketmine\block\tile\Spawnable::getSpawnCompound ( )
finalinherited

Definition at line 72 of file Spawnable.php.

◆ getText()

pocketmine\block\tile\Sign::getText ( )
inherited

Definition at line 124 of file Sign.php.

◆ isClosed()

pocketmine\block\tile\Tile::isClosed ( )
inherited

Definition at line 106 of file Tile.php.

◆ isWaxed()

pocketmine\block\tile\Sign::isWaxed ( )
inherited

Definition at line 132 of file Sign.php.

◆ onBlockDestroyed()

pocketmine\block\tile\Tile::onBlockDestroyed ( )
finalinherited

Called when the tile's block is destroyed.

Definition at line 117 of file Tile.php.

References pocketmine\block\tile\onBlockDestroyedHook().

+ Here is the call graph for this function:

◆ onBlockDestroyedHook()

pocketmine\block\tile\Tile::onBlockDestroyedHook ( )
protectedinherited

Override this method to do actions you need to do when this tile is destroyed due to block being broken.

Reimplemented in pocketmine\block\tile\Chest, pocketmine\block\tile\Jukebox, and pocketmine\block\tile\ShulkerBox.

Definition at line 125 of file Tile.php.

◆ readSaveData()

pocketmine\block\tile\Sign::readSaveData ( CompoundTag $nbt)
inherited

Reimplemented from pocketmine\block\tile\Tile.

Definition at line 84 of file Sign.php.

◆ saveNBT()

pocketmine\block\tile\Tile::saveNBT ( )
inherited

Definition at line 70 of file Tile.php.

◆ setEditorEntityRuntimeId()

pocketmine\block\tile\Sign::setEditorEntityRuntimeId ( ?int $editorEntityRuntimeId)
inherited

Definition at line 148 of file Sign.php.

◆ setText()

pocketmine\block\tile\Sign::setText ( SignText $text)
inherited

Definition at line 128 of file Sign.php.

◆ setWaxed()

pocketmine\block\tile\Sign::setWaxed ( bool $waxed)
inherited

Definition at line 134 of file Sign.php.

◆ writeSaveData()

pocketmine\block\tile\Sign::writeSaveData ( CompoundTag $nbt)
protectedinherited

Writes additional save data to a CompoundTag, not including generic things like ID and coordinates.

Reimplemented from pocketmine\block\tile\Tile.

Definition at line 107 of file Sign.php.

Member Data Documentation

◆ $closed

bool pocketmine\block\tile\Tile::$closed = false
inherited

Definition at line 50 of file Tile.php.

◆ $editorEntityRuntimeId

int pocketmine\block\tile\Sign::$editorEntityRuntimeId = null
protectedinherited

Definition at line 63 of file Sign.php.

◆ $position

Position pocketmine\block\tile\Tile::$position
protectedinherited

Definition at line 49 of file Tile.php.

◆ $text

SignText pocketmine\block\tile\Sign::$text
protectedinherited

Definition at line 60 of file Sign.php.

◆ $timings

TimingsHandler pocketmine\block\tile\Tile::$timings
protectedinherited

Definition at line 51 of file Tile.php.

◆ TAG_BACK_TEXT

const pocketmine\block\tile\Sign::TAG_BACK_TEXT = "BackText"
inherited

Definition at line 56 of file Sign.php.

◆ TAG_FRONT_TEXT

const pocketmine\block\tile\Sign::TAG_FRONT_TEXT = "FrontText"
inherited

Definition at line 55 of file Sign.php.

◆ TAG_GLOWING_TEXT

const pocketmine\block\tile\Sign::TAG_GLOWING_TEXT = "IgnoreLighting"
inherited

Definition at line 47 of file Sign.php.

◆ TAG_ID

const pocketmine\block\tile\Tile::TAG_ID = "id"
inherited

Definition at line 44 of file Tile.php.

◆ TAG_LEGACY_BUG_RESOLVE

const pocketmine\block\tile\Sign::TAG_LEGACY_BUG_RESOLVE = "TextIgnoreLegacyBugResolved"
inherited

This tag is set to indicate that MCPE-117835 has been addressed in whatever version this sign was created.

See also
https://bugs.mojang.com/browse/MCPE-117835

Definition at line 53 of file Sign.php.

◆ TAG_LOCKED_FOR_EDITING_BY

const pocketmine\block\tile\Sign::TAG_LOCKED_FOR_EDITING_BY = "LockedForEditingBy"
inherited

Definition at line 58 of file Sign.php.

◆ TAG_PERSIST_FORMATTING

const pocketmine\block\tile\Sign::TAG_PERSIST_FORMATTING = "PersistFormatting"
inherited

Definition at line 48 of file Sign.php.

◆ TAG_TEXT_BLOB

const pocketmine\block\tile\Sign::TAG_TEXT_BLOB = "Text"
inherited

Definition at line 44 of file Sign.php.

◆ TAG_TEXT_COLOR

const pocketmine\block\tile\Sign::TAG_TEXT_COLOR = "SignTextColor"
inherited

Definition at line 46 of file Sign.php.

◆ TAG_TEXT_LINE

const pocketmine\block\tile\Sign::TAG_TEXT_LINE = "Text%d"
inherited

Definition at line 45 of file Sign.php.

◆ TAG_WAXED

const pocketmine\block\tile\Sign::TAG_WAXED = "IsWaxed"
inherited

Definition at line 57 of file Sign.php.

◆ TAG_X

const pocketmine\block\tile\Tile::TAG_X = "x"
inherited

Definition at line 45 of file Tile.php.

◆ TAG_Y

const pocketmine\block\tile\Tile::TAG_Y = "y"
inherited

Definition at line 46 of file Tile.php.

◆ TAG_Z

const pocketmine\block\tile\Tile::TAG_Z = "z"
inherited

Definition at line 47 of file Tile.php.


The documentation for this class was generated from the following file: