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(BlockPos blockPos,
BlockState blockState) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
copyItemDataRequiresOperator() |
void |
fromTag(CompoundTag compoundTag) |
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() |
cancelRemoval, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, setCachedState, setWorldprivate final Text[] text
private boolean editable
private PlayerEntity editor
private final OrderedText[] textBeingEdited
private DyeColor textColor
public SignBlockEntity(BlockPos blockPos, BlockState blockState)
public CompoundTag toTag(CompoundTag tag)
toTag in class BlockEntitypublic void fromTag(CompoundTag compoundTag)
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 BlockEntitypublic CompoundTag toInitialChunkDataTag()
toInitialChunkDataTag in class BlockEntitypublic boolean copyItemDataRequiresOperator()
copyItemDataRequiresOperator in class BlockEntitypublic 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)