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:
IAttachmentHolder
,IBlockEntityExtension
,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
CustomSignsTest.CustomSignBlockEntity
,HangingSignBlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
Modifier and TypeFieldDescriptionprivate SignText
private SignText
private boolean
private static final org.slf4j.Logger
private static final int
private UUID
private static final int
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
-
Constructor Summary
ConstructorDescriptionSignBlockEntity
(BlockPos p_155700_, BlockState p_155701_) SignBlockEntity
(BlockEntityType p_249609_, BlockPos p_248914_, BlockState p_249550_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canExecuteClickCommands
(boolean p_278276_, Player p_278240_) private void
clearInvalidPlayerWhoMayEdit
(SignBlockEntity p_277656_, Level p_277853_, UUID p_277849_) private static CommandSourceStack
createCommandSourceStack
(Player p_279428_, Level p_279359_, BlockPos p_279430_) protected SignText
boolean
executeClickCommandsIfPresent
(Player p_279304_, Level p_279201_, BlockPos p_278282_, boolean p_278254_) int
getText
(boolean p_277918_) int
boolean
isFacingFrontText
(Player p_277382_) boolean
isWaxed()
void
load
(CompoundTag p_155716_) private Component
private SignText
private void
boolean
boolean
playerIsTooFarAwayToEdit
(UUID p_277978_) protected void
saveAdditional
(CompoundTag p_187515_) void
setAllowedPlayerEditor
(UUID p_155714_) private boolean
setBackText
(SignText p_277777_) private boolean
setFrontText
(SignText p_278038_) private SignText
setMessages
(Player p_277396_, List<FilteredText> p_277744_, SignText p_277359_) boolean
boolean
setWaxed
(boolean p_277344_) static void
tick
(Level p_277662_, BlockPos p_278050_, BlockState p_277927_, SignBlockEntity p_277928_) void
updateSignText
(Player p_278048_, boolean p_278103_, List<FilteredText> p_277990_) boolean
updateText
(UnaryOperator<SignText> p_277877_, boolean p_277426_) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, removeData, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setData, setLevel, setRemoved, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
areAttachmentsCompatible, deserializeAttachments, getData, hasAttachments, hasData, serializeAttachments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
deserializeNBT, getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
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
-
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:
saveAdditional
in classBlockEntity
-
load
- Overrides:
load
in classBlockEntity
-
loadLines
-
loadLine
-
updateSignText
-
updateText
-
setMessages
-
setText
-
setBackText
-
setFrontText
-
canExecuteClickCommands
-
executeClickCommandsIfPresent
-
createCommandSourceStack
private static CommandSourceStack createCommandSourceStack(@Nullable Player p_279428_, Level p_279359_, BlockPos p_279430_) -
getUpdatePacket
- Overrides:
getUpdatePacket
in classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTag
in classBlockEntity
-
onlyOpCanSetNbt
public boolean onlyOpCanSetNbt()- Overrides:
onlyOpCanSetNbt
in classBlockEntity
-
setAllowedPlayerEditor
-
getPlayerWhoMayEdit
-
markUpdated
private void markUpdated() -
isWaxed
public boolean isWaxed() -
setWaxed
public boolean setWaxed(boolean p_277344_) -
playerIsTooFarAwayToEdit
-
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
-