Class SignBlockEntity

All Implemented Interfaces:
ICapabilityProvider, ICapabilityProviderImpl<BlockEntity>, ICapabilitySerializable<CompoundTag>, IForgeBlockEntity, INBTSerializable<CompoundTag>
Direct Known Subclasses:
HangingSignBlockEntity

public class SignBlockEntity extends BlockEntity
  • Field Details

    • LINES

      public static final int LINES
      See Also:
    • MAX_TEXT_LINE_WIDTH

      private static final int MAX_TEXT_LINE_WIDTH
      See Also:
    • TEXT_LINE_HEIGHT

      private static final int TEXT_LINE_HEIGHT
      See Also:
    • RAW_TEXT_FIELD_NAMES

      private static final String[] RAW_TEXT_FIELD_NAMES
    • FILTERED_TEXT_FIELD_NAMES

      private static final String[] FILTERED_TEXT_FIELD_NAMES
    • messages

      private final Component[] messages
    • filteredMessages

      private final Component[] filteredMessages
    • isEditable

      private boolean isEditable
    • playerWhoMayEdit

      @Nullable private UUID playerWhoMayEdit
    • renderMessages

      @Nullable private FormattedCharSequence[] renderMessages
    • renderMessagedFiltered

      private boolean renderMessagedFiltered
    • color

      private DyeColor color
    • hasGlowingText

      private boolean hasGlowingText
  • Constructor Details

  • Method Details

    • getTextLineHeight

      public int getTextLineHeight()
    • getMaxTextLineWidth

      public int getMaxTextLineWidth()
    • saveAdditional

      protected void saveAdditional(CompoundTag p_187515_)
      Overrides:
      saveAdditional in class BlockEntity
    • load

      public void load(CompoundTag p_155716_)
      Overrides:
      load in class BlockEntity
    • loadLine

      private Component loadLine(String p_155712_)
    • deserializeTextSafe

      private Component deserializeTextSafe(String p_155721_)
    • getMessage

      public Component getMessage(int p_155707_, boolean p_155708_)
    • setMessage

      public void setMessage(int p_59733_, Component p_59734_)
    • setMessage

      public void setMessage(int p_155703_, Component p_155704_, Component p_155705_)
    • getRenderMessages

      public FormattedCharSequence[] getRenderMessages(boolean p_155718_, Function<Component,FormattedCharSequence> p_155719_)
    • getMessages

      private Component[] getMessages(boolean p_155725_)
    • getUpdatePacket

      public ClientboundBlockEntityDataPacket getUpdatePacket()
      Overrides:
      getUpdatePacket in class BlockEntity
    • getUpdateTag

      public CompoundTag getUpdateTag()
      Overrides:
      getUpdateTag in class BlockEntity
    • onlyOpCanSetNbt

      public boolean onlyOpCanSetNbt()
      Overrides:
      onlyOpCanSetNbt in class BlockEntity
    • isEditable

      public boolean isEditable()
    • setEditable

      public void setEditable(boolean p_59747_)
    • setAllowedPlayerEditor

      public void setAllowedPlayerEditor(UUID p_155714_)
    • getPlayerWhoMayEdit

      @Nullable public UUID getPlayerWhoMayEdit()
    • hasAnyClickCommands

      public boolean hasAnyClickCommands(Player p_250783_)
    • executeClickCommands

      public boolean executeClickCommands(ServerPlayer p_155710_)
    • createCommandSourceStack

      public CommandSourceStack createCommandSourceStack(@Nullable ServerPlayer p_59736_)
    • getColor

      public DyeColor getColor()
    • setColor

      public boolean setColor(DyeColor p_59740_)
    • hasGlowingText

      public boolean hasGlowingText()
    • setHasGlowingText

      public boolean setHasGlowingText(boolean p_155723_)
    • markUpdated

      private void markUpdated()