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.DataComponentInputNested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SignTextprivate 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 interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionSignBlockEntity(BlockPos p_155700_, BlockState p_155701_) SignBlockEntity(BlockEntityType p_249609_, BlockPos p_248914_, BlockState p_249550_) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanExecuteClickCommands(boolean p_278276_, Player p_278240_) private voidclearInvalidPlayerWhoMayEdit(SignBlockEntity p_277656_, Level p_277853_, UUID p_277849_) private static CommandSourceStackcreateCommandSourceStack(Player p_279428_, Level p_279359_, BlockPos p_279430_) protected SignTextbooleanexecuteClickCommandsIfPresent(Player p_279304_, Level p_279201_, BlockPos p_278282_, boolean p_278254_) intReturn anAABBthat controls the visible scope of aBlockEntityWithoutLevelRendererassociated with thisBlockEntityDefaults to the collision bounding boxBlockBehaviour.BlockStateBase.getCollisionShape(BlockGetter, BlockPos)associated with the block at this location.getText(boolean p_277918_) intgetUpdateTag(HolderLookup.Provider p_333348_) booleanisFacingFrontText(Player p_277382_) booleanisWaxed()protected voidloadAdditional(CompoundTag p_329420_, HolderLookup.Provider p_336389_) private Componentprivate SignTextprivate voidbooleanbooleanplayerIsTooFarAwayToEdit(UUID p_277978_) protected voidsaveAdditional(CompoundTag p_187515_, HolderLookup.Provider p_331864_) voidsetAllowedPlayerEditor(UUID p_155714_) private booleansetBackText(SignText p_277777_) private booleansetFrontText(SignText p_278038_) private SignTextsetMessages(Player p_277396_, List<FilteredText> p_277744_, SignText p_277359_) booleanbooleansetWaxed(boolean p_277344_) static voidtick(Level p_277662_, BlockPos p_278050_, BlockState p_277927_, SignBlockEntity p_277928_) voidupdateSignText(Player p_278048_, boolean p_278103_, List<FilteredText> p_277990_) booleanupdateText(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, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods 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:
saveAdditionalin classBlockEntity
-
loadAdditional
- Overrides:
loadAdditionalin 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:
getUpdatePacketin classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTagin classBlockEntity
-
onlyOpCanSetNbt
public boolean onlyOpCanSetNbt()- Overrides:
onlyOpCanSetNbtin 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:IForgeBlockEntityReturn anAABBthat controls the visible scope of aBlockEntityWithoutLevelRendererassociated with thisBlockEntityDefaults to the collision bounding boxBlockBehaviour.BlockStateBase.getCollisionShape(BlockGetter, BlockPos)associated with the block at this location.- Returns:
- an appropriately size
AABBfor theBlockEntity
-
getSignInteractionFailedSoundEvent
-