public class SignBlockEntity extends BlockEntity
Modifier and Type | Field and Description |
---|---|
private boolean |
editable |
private PlayerEntity |
editor |
private Text[] |
text |
private OrderedText[] |
textBeingEdited |
private DyeColor |
textColor |
pos, removed, world
Constructor and Description |
---|
SignBlockEntity() |
Modifier and Type | Method and 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() |
applyMirror, applyRotation, cancelRemoval, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos
private final Text[] text
private boolean editable
private PlayerEntity editor
private final OrderedText[] textBeingEdited
private DyeColor textColor
public CompoundTag toTag(CompoundTag tag)
toTag
in class BlockEntity
public void fromTag(BlockState state, CompoundTag tag)
fromTag
in class BlockEntity
@Environment(value=CLIENT) public Text getTextOnRow(int row)
public void setTextOnRow(int row, Text text)
@Environment(value=CLIENT) @Nullable public OrderedText getTextBeingEditedOnRow(int row, Function<Text,OrderedText> function)
@Nullable public BlockEntityUpdateS2CPacket toUpdatePacket()
toUpdatePacket
in class BlockEntity
public CompoundTag toInitialChunkDataTag()
toInitialChunkDataTag
in class BlockEntity
public boolean copyItemDataRequiresOperator()
copyItemDataRequiresOperator
in class BlockEntity
public boolean isEditable()
@Environment(value=CLIENT) public void setEditable(boolean bool)
public void setEditor(PlayerEntity player)
public PlayerEntity getEditor()
public boolean onActivate(PlayerEntity player)
public ServerCommandSource getCommandSource(@Nullable ServerPlayerEntity player)
public DyeColor getTextColor()
public boolean setTextColor(DyeColor value)