Class SignEntity

java.lang.Object
net.glowstone.block.entity.BlockEntity
net.glowstone.block.entity.SignEntity

public class SignEntity extends BlockEntity
  • Constructor Details

    • SignEntity

      public SignEntity(GlowBlock block)
      Creates the entity for the given sign block.
      Parameters:
      block - a sign block (wall or post)
  • Method Details

    • update

      public void update(GlowPlayer player)
      Description copied from class: BlockEntity
      Update this BlockEntity's visible state to the given player.
      Overrides:
      update in class BlockEntity
      Parameters:
      player - The player to update.
    • loadNbt

      public void loadNbt(CompoundTag tag)
      Description copied from class: BlockEntity
      Read this BlockEntity's data from the saved tag.
      Overrides:
      loadNbt in class BlockEntity
      Parameters:
      tag - The tag to load from.
    • saveNbt

      public void saveNbt(CompoundTag tag)
      Description copied from class: BlockEntity
      Save this BlockEntity's data to NBT.
      Overrides:
      saveNbt in class BlockEntity
      Parameters:
      tag - The tag to save to.
    • getState

      public GlowBlockState getState()
      Description copied from class: BlockEntity
      Create a new BlockState which will correspond to this block entity.
      Overrides:
      getState in class BlockEntity
      Returns:
      A GlowBlockState, or null to use a standard BlockState.
    • getLines

      public String[] getLines()
      Get the lines of text on the sign.
      Returns:
      The sign's lines.
    • setLines

      public void setLines(String... text)
      Set the lines of text on the sign.
      Parameters:
      text - The lines of text.
      Throws:
      IllegalArgumentException - If the wrong number of lines is provided.