Class SignBlockEntity

All Implemented Interfaces:
IAttachmentHolder, IBlockEntityExtension, INBTSerializable<CompoundTag>
Direct Known Subclasses:
CustomSignsTest.CustomSignBlockEntity, HangingSignBlockEntity

public class SignBlockEntity extends BlockEntity
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • 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:
    • playerWhoMayEdit

      @Nullable private UUID playerWhoMayEdit
    • frontText

      private SignText frontText
    • backText

      private SignText backText
    • isWaxed

      private boolean isWaxed
  • Constructor Details

  • Method Details

    • createDefaultSignText

      protected SignText createDefaultSignText()
    • isFacingFrontText

      public boolean isFacingFrontText(Player p_277382_)
    • getText

      public SignText getText(boolean p_277918_)
    • getFrontText

      public SignText getFrontText()
    • getBackText

      public SignText getBackText()
    • 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
    • loadLines

      private SignText loadLines(SignText p_278305_)
    • loadLine

      private Component loadLine(Component p_278307_)
    • updateSignText

      public void updateSignText(Player p_278048_, boolean p_278103_, List<FilteredText> p_277990_)
    • updateText

      public boolean updateText(UnaryOperator<SignText> p_277877_, boolean p_277426_)
    • setMessages

      private SignText setMessages(Player p_277396_, List<FilteredText> p_277744_, SignText p_277359_)
    • setText

      public boolean setText(SignText p_277733_, boolean p_277720_)
    • setBackText

      private boolean setBackText(SignText p_277777_)
    • setFrontText

      private boolean setFrontText(SignText p_278038_)
    • canExecuteClickCommands

      public boolean canExecuteClickCommands(boolean p_278276_, Player p_278240_)
    • executeClickCommandsIfPresent

      public boolean executeClickCommandsIfPresent(Player p_279304_, Level p_279201_, BlockPos p_278282_, boolean p_278254_)
    • createCommandSourceStack

      private static CommandSourceStack createCommandSourceStack(@Nullable Player p_279428_, Level p_279359_, BlockPos p_279430_)
    • 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
    • setAllowedPlayerEditor

      public void setAllowedPlayerEditor(@Nullable UUID p_155714_)
    • getPlayerWhoMayEdit

      @Nullable public UUID getPlayerWhoMayEdit()
    • markUpdated

      private void markUpdated()
    • isWaxed

      public boolean isWaxed()
    • setWaxed

      public boolean setWaxed(boolean p_277344_)
    • playerIsTooFarAwayToEdit

      public boolean playerIsTooFarAwayToEdit(UUID p_277978_)
    • tick

      public static void tick(Level p_277662_, BlockPos p_278050_, BlockState p_277927_, SignBlockEntity p_277928_)
    • clearInvalidPlayerWhoMayEdit

      private void clearInvalidPlayerWhoMayEdit(SignBlockEntity p_277656_, Level p_277853_, UUID p_277849_)
    • getSignInteractionFailedSoundEvent

      public SoundEvent getSignInteractionFailedSoundEvent()