Class SignBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.SignBlockEntity
- All Implemented Interfaces:
ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,IForgeBlockEntity
- Direct Known Subclasses:
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.minecraftforge.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
Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
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
Return anAABB
that controls the visible scope of aBlockEntityWithoutLevelRenderer
associated with thisBlockEntity
Defaults to the collision bounding boxBlockBehaviour.BlockStateBase.getCollisionShape(BlockGetter, BlockPos)
associated with the block at this location.getText
(boolean p_277918_) int
getUpdateTag
(HolderLookup.Provider p_333348_) boolean
isFacingFrontText
(Player p_277382_) boolean
isWaxed()
protected void
loadAdditional
(CompoundTag p_329420_, HolderLookup.Provider p_336389_) private Component
private SignText
private void
boolean
boolean
playerIsTooFarAwayToEdit
(UUID p_277978_) protected void
saveAdditional
(CompoundTag p_187515_, HolderLookup.Provider p_331864_) 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, getPosFromTag, getType, hasLevel, isRemoved, loadCustomOnly, loadStatic, loadWithComponents, onChunkUnloaded, parseCustomNameSafe, removeComponentsFromTag, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setLevel, setRemoved, triggerEvent
Methods inherited from class net.minecraftforge.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.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
getModelData, handleUpdateTag, hasCustomOutlineRendering, 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_) -
getRenderBoundingBox
Description copied from interface:IForgeBlockEntity
Return anAABB
that controls the visible scope of aBlockEntityWithoutLevelRenderer
associated with thisBlockEntity
Defaults to the collision bounding boxBlockBehaviour.BlockStateBase.getCollisionShape(BlockGetter, BlockPos)
associated with the block at this location.- Returns:
- an appropriately size
AABB
for theBlockEntity
-
getSignInteractionFailedSoundEvent
-