public class SignEntity extends BlockEntity
block| Constructor and Description |
|---|
SignEntity(GlowBlock block)
Creates the entity for the given sign block.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getLines()
Get the lines of text on the sign.
|
GlowBlockState |
getState()
Create a new BlockState which will correspond to this block entity.
|
void |
loadNbt(CompoundTag tag)
Read this BlockEntity's data from the saved tag.
|
void |
saveNbt(CompoundTag tag)
Save this BlockEntity's data to NBT.
|
void |
setLines(String... text)
Set the lines of text on the sign.
|
void |
update(GlowPlayer player)
Update this BlockEntity's visible state to the given player.
|
destroy, getBlock, pulse, setSaveId, updateInRangepublic SignEntity(GlowBlock block)
block - a sign block (wall or post)public void update(GlowPlayer player)
BlockEntityupdate in class BlockEntityplayer - The player to update.public void loadNbt(CompoundTag tag)
BlockEntityloadNbt in class BlockEntitytag - The tag to load from.public void saveNbt(CompoundTag tag)
BlockEntitysaveNbt in class BlockEntitytag - The tag to save to.public GlowBlockState getState()
BlockEntitygetState in class BlockEntitypublic String[] getLines()
public void setLines(String... text)
text - The lines of text.IllegalArgumentException - If the wrong number of lines is provided.Copyright © 2021. All rights reserved.