Class SignBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.SignBlockEntity
- All Implemented Interfaces:
DebugValueSource,IAttachmentHolder,IBlockEntityExtension
- Direct Known Subclasses:
HangingSignBlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.BlockEntityPathElementNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsFieldNested classes/interfaces inherited from interface net.minecraft.util.debug.DebugValueSource
DebugValueSource.Registration, DebugValueSource.ValueGetter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SignTextprivate static final booleanprivate SignTextprivate booleanprivate static final org.slf4j.Loggerprivate static final intprivate UUIDprivate static final intFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
ConstructorsConstructorDescriptionSignBlockEntity(BlockPos pPos, BlockState pBlockState) SignBlockEntity(BlockEntityType p_249609_, BlockPos p_248914_, BlockState p_249550_) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanExecuteClickCommands(boolean pIsFrontText, Player pPlayer) private voidclearInvalidPlayerWhoMayEdit(SignBlockEntity pSign, Level pLevel, UUID pUuid) private static CommandSourceStackcreateCommandSourceStack(Player pPlayer, ServerLevel pLevel, BlockPos pPos) protected SignTextbooleanexecuteClickCommandsIfPresent(ServerLevel pLevel, Player pPlayer, BlockPos pPos, boolean pIsFrontText) intgetText(boolean pIsFrontText) intgetUpdateTag(HolderLookup.Provider p_324439_) booleanisFacingFrontText(Player pPlayer) booleanisWaxed()protected voidloadAdditional(ValueInput p_422423_) private Componentprivate SignTextprivate voidbooleanplayerIsTooFarAwayToEdit(UUID pUuid) protected voidsaveAdditional(ValueOutput p_421950_) voidsetAllowedPlayerEditor(UUID pPlayWhoMayEdit) private booleansetBackText(SignText pText) private booleansetFrontText(SignText pText) private SignTextsetMessages(Player pPlayer, List<FilteredText> pFilteredText, SignText pText) booleanbooleansetWaxed(boolean pIsWaxed) static voidtick(Level pLevel, BlockPos pPos, BlockState pState, SignBlockEntity pSign) voidupdateSignText(Player pPlayer, boolean pIsFrontText, List<FilteredText> pFilteredText) booleanupdateText(UnaryOperator<SignText> pUpdater, boolean pIsFrontText) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, preRemoveSideEffects, problemPath, registerDebugValues, removeComponentsFromTag, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
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:
-
DEFAULT_IS_WAXED
private static final boolean DEFAULT_IS_WAXED- See Also:
-
playerWhoMayEdit
-
frontText
-
backText
-
isWaxed
private boolean isWaxed
-
-
Constructor Details
-
SignBlockEntity
-
SignBlockEntity
-
-
Method Details
-
createDefaultSignText
-
isFacingFrontText
-
getText
-
getFrontText
-
getBackText
-
getTextLineHeight
public int getTextLineHeight() -
getMaxTextLineWidth
public int getMaxTextLineWidth() -
saveAdditional
- Overrides:
saveAdditionalin classBlockEntity
-
loadAdditional
- Overrides:
loadAdditionalin classBlockEntity
-
loadLines
-
loadLine
-
updateSignText
-
updateText
-
setMessages
-
setText
-
setBackText
-
setFrontText
-
canExecuteClickCommands
-
executeClickCommandsIfPresent
public boolean executeClickCommandsIfPresent(ServerLevel pLevel, Player pPlayer, BlockPos pPos, boolean pIsFrontText) -
createCommandSourceStack
private static CommandSourceStack createCommandSourceStack(@Nullable Player pPlayer, ServerLevel pLevel, BlockPos pPos) -
getUpdatePacket
- Overrides:
getUpdatePacketin classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTagin classBlockEntity
-
setAllowedPlayerEditor
-
getPlayerWhoMayEdit
-
markUpdated
private void markUpdated() -
isWaxed
public boolean isWaxed() -
setWaxed
public boolean setWaxed(boolean pIsWaxed) -
playerIsTooFarAwayToEdit
-
tick
-
clearInvalidPlayerWhoMayEdit
-
getSignInteractionFailedSoundEvent
-