Package net.minecraft.block.entity
Class SignBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.SignBlockEntity
public class SignBlockEntity extends BlockEntity
-
Field Summary
Fields Modifier and Type Field Description private boolean
editable
private PlayerEntity
editor
private Text[]
text
private OrderedText[]
textBeingEdited
private DyeColor
textColor
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
-
Constructor Summary
Constructors Constructor Description SignBlockEntity()
-
Method Summary
Modifier and Type Method Description boolean
copyItemDataRequiresOperator()
void
fromTag(BlockState state, CompoundTag tag)
ServerCommandSource
getCommandSource(ServerPlayerEntity player)
PlayerEntity
getEditor()
OrderedText
getTextBeingEditedOnRow(int row, Function<Text,OrderedText> function)
DyeColor
getTextColor()
Text
getTextOnRow(int row)
boolean
isEditable()
boolean
onActivate(PlayerEntity player)
void
setEditable(boolean bool)
void
setEditor(PlayerEntity player)
boolean
setTextColor(DyeColor value)
void
setTextOnRow(int row, Text text)
CompoundTag
toInitialChunkDataTag()
CompoundTag
toTag(CompoundTag tag)
BlockEntityUpdateS2CPacket
toUpdatePacket()
Methods inherited from class net.minecraft.block.entity.BlockEntity
applyMirror, applyRotation, cancelRemoval, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos
-
Field Details
-
text
-
editable
private boolean editable -
editor
-
textBeingEdited
-
textColor
-
-
Constructor Details
-
SignBlockEntity
public SignBlockEntity()
-
-
Method Details
-
toTag
- Overrides:
toTag
in classBlockEntity
-
fromTag
- Overrides:
fromTag
in classBlockEntity
-
getTextOnRow
-
setTextOnRow
-
getTextBeingEditedOnRow
@Environment(CLIENT) @Nullable public OrderedText getTextBeingEditedOnRow(int row, Function<Text,OrderedText> function) -
toUpdatePacket
- Overrides:
toUpdatePacket
in classBlockEntity
-
toInitialChunkDataTag
- Overrides:
toInitialChunkDataTag
in classBlockEntity
-
copyItemDataRequiresOperator
public boolean copyItemDataRequiresOperator()- Overrides:
copyItemDataRequiresOperator
in classBlockEntity
-
isEditable
public boolean isEditable() -
setEditable
@Environment(CLIENT) public void setEditable(boolean bool) -
setEditor
-
getEditor
-
onActivate
-
getCommandSource
-
getTextColor
-
setTextColor
-