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
- Direct Known Subclasses:
CustomSignsTest.CustomSignBlockEntity
,HangingSignBlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
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
getUpdateTag
(HolderLookup.Provider p_324439_) boolean
isFacingFrontText
(Player p_277382_) boolean
isWaxed()
protected void
loadAdditional
(CompoundTag p_155716_, HolderLookup.Provider p_324351_) private Component
private SignText
private void
boolean
boolean
playerIsTooFarAwayToEdit
(UUID p_277978_) protected void
saveAdditional
(CompoundTag p_187515_, HolderLookup.Provider p_324471_) 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, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, 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, getExistingData, hasData, removeData, setData
Methods 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:
-
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
-
loadAdditional
- Overrides:
loadAdditional
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
-