Class SignBlockEntity
java.lang.Object
net.neoforged.neoforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.SignBlockEntity
- All Implemented Interfaces:
ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,ICapabilitySerializable<CompoundTag>
,IBlockEntityExtension
,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
CustomSignsTest.CustomSignBlockEntity
,HangingSignBlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
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
-
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_) getTextFacingPlayer
(Player p_277444_) 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, onChunkUnloaded, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEvent
Methods inherited from class net.neoforged.neoforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
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.common.extensions.IBlockEntityExtension
deserializeNBT, getModelData, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
Methods inherited from interface net.neoforged.neoforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
-
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
-
getTextFacingPlayer
-
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_)
-