- Deprecated
- See also
- \pocketmine\block\BaseSign
Definition at line 46 of file Sign.php.
◆ __construct()
pocketmine\block\tile\Sign::__construct |
( |
World | $world, |
|
|
Vector3 | $pos ) |
◆ addAdditionalSpawnData()
pocketmine\block\tile\Sign::addAdditionalSpawnData |
( |
CompoundTag | $nbt | ) |
|
|
protected |
◆ clearSpawnCompoundCache()
pocketmine\block\tile\Spawnable::clearSpawnCompoundCache |
( |
| ) |
|
|
inherited |
◆ close()
pocketmine\block\tile\Tile::close |
( |
| ) |
|
|
inherited |
◆ copyDataFromItem()
pocketmine\block\tile\Tile::copyDataFromItem |
( |
Item | $item | ) |
|
|
inherited |
◆ fixTextBlob()
static pocketmine\block\tile\Sign::fixTextBlob |
( |
string | $blob | ) |
|
|
static |
- Returns
- string[]
Definition at line 66 of file Sign.php.
◆ getBlock()
pocketmine\block\tile\Tile::getBlock |
( |
| ) |
|
|
inherited |
◆ getCleanedNBT()
pocketmine\block\tile\Tile::getCleanedNBT |
( |
| ) |
|
|
inherited |
◆ getEditorEntityRuntimeId()
pocketmine\block\tile\Sign::getEditorEntityRuntimeId |
( |
| ) |
|
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 156 of file Sign.php.
◆ getPosition()
pocketmine\block\tile\Tile::getPosition |
( |
| ) |
|
|
inherited |
◆ 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 68 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<\pocketmine\nbt\tag\CompoundTag>
Definition at line 78 of file Spawnable.php.
◆ getSpawnCompound()
pocketmine\block\tile\Spawnable::getSpawnCompound |
( |
| ) |
|
|
finalinherited |
◆ getText()
pocketmine\block\tile\Sign::getText |
( |
| ) |
|
◆ isClosed()
pocketmine\block\tile\Tile::isClosed |
( |
| ) |
|
|
inherited |
◆ isDirty()
pocketmine\block\tile\Spawnable::isDirty |
( |
| ) |
|
|
inherited |
◆ isWaxed()
pocketmine\block\tile\Sign::isWaxed |
( |
| ) |
|
◆ onBlockDestroyed()
pocketmine\block\tile\Tile::onBlockDestroyed |
( |
| ) |
|
|
finalinherited |
◆ onBlockDestroyedHook()
pocketmine\block\tile\Tile::onBlockDestroyedHook |
( |
| ) |
|
|
protectedinherited |
◆ readSaveData()
pocketmine\block\tile\Sign::readSaveData |
( |
CompoundTag | $nbt | ) |
|
◆ saveNBT()
pocketmine\block\tile\Tile::saveNBT |
( |
| ) |
|
|
inherited |
◆ setDirty()
pocketmine\block\tile\Spawnable::setDirty |
( |
bool | $dirty = true | ) |
|
|
inherited |
◆ setEditorEntityRuntimeId()
pocketmine\block\tile\Sign::setEditorEntityRuntimeId |
( |
?int | $editorEntityRuntimeId | ) |
|
◆ setText()
pocketmine\block\tile\Sign::setText |
( |
SignText | $text | ) |
|
◆ setWaxed()
pocketmine\block\tile\Sign::setWaxed |
( |
bool | $waxed | ) |
|
◆ writeSaveData()
pocketmine\block\tile\Sign::writeSaveData |
( |
CompoundTag | $nbt | ) |
|
|
protected |
Writes additional save data to a CompoundTag, not including generic things like ID and coordinates.
Reimplemented from pocketmine\block\tile\Tile.
Definition at line 117 of file Sign.php.
◆ $closed
bool pocketmine\block\tile\Tile::$closed = false |
|
inherited |
◆ $editorEntityRuntimeId
int pocketmine\block\tile\Sign::$editorEntityRuntimeId = null |
|
protected |
◆ $position
Position pocketmine\block\tile\Tile::$position |
|
protectedinherited |
◆ $text
SignText pocketmine\block\tile\Sign::$text |
|
protected |
◆ $timings
◆ TAG_BACK_TEXT
const pocketmine\block\tile\Sign::TAG_BACK_TEXT = "BackText" |
◆ TAG_FRONT_TEXT
const pocketmine\block\tile\Sign::TAG_FRONT_TEXT = "FrontText" |
◆ TAG_GLOWING_TEXT
const pocketmine\block\tile\Sign::TAG_GLOWING_TEXT = "IgnoreLighting" |
◆ TAG_ID
const pocketmine\block\tile\Tile::TAG_ID = "id" |
|
inherited |
◆ TAG_LEGACY_BUG_RESOLVE
const pocketmine\block\tile\Sign::TAG_LEGACY_BUG_RESOLVE = "TextIgnoreLegacyBugResolved" |
◆ TAG_LOCKED_FOR_EDITING_BY
const pocketmine\block\tile\Sign::TAG_LOCKED_FOR_EDITING_BY = "LockedForEditingBy" |
◆ TAG_PERSIST_FORMATTING
const pocketmine\block\tile\Sign::TAG_PERSIST_FORMATTING = "PersistFormatting" |
◆ TAG_TEXT_BLOB
const pocketmine\block\tile\Sign::TAG_TEXT_BLOB = "Text" |
◆ TAG_TEXT_COLOR
const pocketmine\block\tile\Sign::TAG_TEXT_COLOR = "SignTextColor" |
◆ TAG_TEXT_LINE
const pocketmine\block\tile\Sign::TAG_TEXT_LINE = "Text%d" |
◆ TAG_WAXED
const pocketmine\block\tile\Sign::TAG_WAXED = "IsWaxed" |
◆ TAG_X
const pocketmine\block\tile\Tile::TAG_X = "x" |
|
inherited |
◆ TAG_Y
const pocketmine\block\tile\Tile::TAG_Y = "y" |
|
inherited |
◆ TAG_Z
const pocketmine\block\tile\Tile::TAG_Z = "z" |
|
inherited |
The documentation for this class was generated from the following file: