Class SignBlockEntity
- Mappings:
Namespace Name official cukintermediary net/minecraft/class_2625named net/minecraft/block/entity/SignBlockEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanstatic final intprivate static final String[]private final Text[]private booleanprivate booleanprivate static final String[]private DyeColorprivate final Text[]private @Nullable OrderedText[]Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the block item should require the player to have operator permissions to copy the block entity data on placement.getTextOnRow(int row, boolean filtered) private Text[]getTexts(boolean filtered) booleanbooleanbooleanonActivate(ServerPlayerEntity player) private TextparseTextFromJson(String json) voidreadNbt(NbtCompound nbt) Reads data fromnbt.voidsetEditable(boolean editable) voidbooleansetGlowingText(boolean glowingText) booleansetTextColor(DyeColor value) voidsetTextOnRow(int row, Text text) voidsetTextOnRow(int row, Text text, Text filteredText) Returns the serialized state of this block entity that is observable by clients.Returns the packet to send to nearby players when the block entity's observable state changes, ornullto not send the packet.private TextunparsedTextFromJson(String json) private voidupdateSign(boolean filterText, Function<Text, OrderedText> textOrderingFunction) protected voidwriteNbt(NbtCompound nbt) Writes data tonbt.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, writeIdToNbt
-
Field Details
-
field_31362
public static final int field_31362- See Also:
- Mappings:
Namespace Name Mixin selector official aLcuk;a:Iintermediary field_31362Lnet/minecraft/class_2625;field_31362:Inamed field_31362Lnet/minecraft/block/entity/SignBlockEntity;field_31362:I
-
TEXT_KEYS
- Mappings:
Namespace Name Mixin selector official bLcuk;b:[Ljava/lang/String;intermediary field_28905Lnet/minecraft/class_2625;field_28905:[Ljava/lang/String;named TEXT_KEYSLnet/minecraft/block/entity/SignBlockEntity;TEXT_KEYS:[Ljava/lang/String;
-
FILTERED_TEXT_KEYS
- Mappings:
Namespace Name Mixin selector official cLcuk;c:[Ljava/lang/String;intermediary field_28906Lnet/minecraft/class_2625;field_28906:[Ljava/lang/String;named FILTERED_TEXT_KEYSLnet/minecraft/block/entity/SignBlockEntity;FILTERED_TEXT_KEYS:[Ljava/lang/String;
-
texts
- Mappings:
Namespace Name Mixin selector official dLcuk;d:[Lrq;intermediary field_12050Lnet/minecraft/class_2625;field_12050:[Lnet/minecraft/class_2561;named textsLnet/minecraft/block/entity/SignBlockEntity;texts:[Lnet/minecraft/text/Text;
-
filteredTexts
- Mappings:
Namespace Name Mixin selector official eLcuk;e:[Lrq;intermediary field_28907Lnet/minecraft/class_2625;field_28907:[Lnet/minecraft/class_2561;named filteredTextsLnet/minecraft/block/entity/SignBlockEntity;filteredTexts:[Lnet/minecraft/text/Text;
-
editable
private boolean editable- Mappings:
Namespace Name Mixin selector official fLcuk;f:Zintermediary field_12048Lnet/minecraft/class_2625;field_12048:Znamed editableLnet/minecraft/block/entity/SignBlockEntity;editable:Z
-
editor
- Mappings:
Namespace Name Mixin selector official gLcuk;g:Ljava/util/UUID;intermediary field_12046Lnet/minecraft/class_2625;field_12046:Ljava/util/UUID;named editorLnet/minecraft/block/entity/SignBlockEntity;editor:Ljava/util/UUID;
-
textsBeingEdited
- Mappings:
Namespace Name Mixin selector official hLcuk;h:[Lalu;intermediary field_12049Lnet/minecraft/class_2625;field_12049:[Lnet/minecraft/class_5481;named textsBeingEditedLnet/minecraft/block/entity/SignBlockEntity;textsBeingEdited:[Lnet/minecraft/text/OrderedText;
-
filterText
private boolean filterText- Mappings:
Namespace Name Mixin selector official iLcuk;i:Zintermediary field_28908Lnet/minecraft/class_2625;field_28908:Znamed filterTextLnet/minecraft/block/entity/SignBlockEntity;filterText:Z
-
textColor
- Mappings:
Namespace Name Mixin selector official jLcuk;j:Lbzq;intermediary field_16419Lnet/minecraft/class_2625;field_16419:Lnet/minecraft/class_1767;named textColorLnet/minecraft/block/entity/SignBlockEntity;textColor:Lnet/minecraft/util/DyeColor;
-
glowingText
private boolean glowingText- Mappings:
Namespace Name Mixin selector official kLcuk;k:Zintermediary field_29225Lnet/minecraft/class_2625;field_29225:Znamed glowingTextLnet/minecraft/block/entity/SignBlockEntity;glowingText:Z
-
-
Constructor Details
-
SignBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>Lcuk;<init>(Lgt;Lcvo;)Vintermediary <init>Lnet/minecraft/class_2625;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed <init>Lnet/minecraft/block/entity/SignBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
writeNbt
Writes data tonbt. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
- Overrides:
writeNbtin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector official bLcti;b(Lpj;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)Vnamed writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
readNbt
Reads data fromnbt. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
nbtmight not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.- Overrides:
readNbtin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector official aLcti;a(Lpj;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)Vnamed readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
parseTextFromJson
- Mappings:
Namespace Name Mixin selector official aLcuk;a(Ljava/lang/String;)Lrq;intermediary method_33828Lnet/minecraft/class_2625;method_33828(Ljava/lang/String;)Lnet/minecraft/class_2561;named parseTextFromJsonLnet/minecraft/block/entity/SignBlockEntity;parseTextFromJson(Ljava/lang/String;)Lnet/minecraft/text/Text;
-
unparsedTextFromJson
- Mappings:
Namespace Name Mixin selector official bLcuk;b(Ljava/lang/String;)Lrq;intermediary method_33384Lnet/minecraft/class_2625;method_33384(Ljava/lang/String;)Lnet/minecraft/class_2561;named unparsedTextFromJsonLnet/minecraft/block/entity/SignBlockEntity;unparsedTextFromJson(Ljava/lang/String;)Lnet/minecraft/text/Text;
-
getTextOnRow
- Mappings:
Namespace Name Mixin selector official aLcuk;a(IZ)Lrq;intermediary method_30843Lnet/minecraft/class_2625;method_30843(IZ)Lnet/minecraft/class_2561;named getTextOnRowLnet/minecraft/block/entity/SignBlockEntity;getTextOnRow(IZ)Lnet/minecraft/text/Text;
-
setTextOnRow
- Mappings:
Namespace Name Mixin selector official aLcuk;a(ILrq;)Vintermediary method_11299Lnet/minecraft/class_2625;method_11299(ILnet/minecraft/class_2561;)Vnamed setTextOnRowLnet/minecraft/block/entity/SignBlockEntity;setTextOnRow(ILnet/minecraft/text/Text;)V
-
setTextOnRow
- Mappings:
Namespace Name Mixin selector official aLcuk;a(ILrq;Lrq;)Vintermediary method_33827Lnet/minecraft/class_2625;method_33827(ILnet/minecraft/class_2561;Lnet/minecraft/class_2561;)Vnamed setTextOnRowLnet/minecraft/block/entity/SignBlockEntity;setTextOnRow(ILnet/minecraft/text/Text;Lnet/minecraft/text/Text;)V
-
updateSign
public OrderedText[] updateSign(boolean filterText, Function<Text, OrderedText> textOrderingFunction) - Mappings:
Namespace Name Mixin selector official aLcuk;a(ZLjava/util/function/Function;)[Lalu;intermediary method_33829Lnet/minecraft/class_2625;method_33829(ZLjava/util/function/Function;)[Lnet/minecraft/class_5481;named updateSignLnet/minecraft/block/entity/SignBlockEntity;updateSign(ZLjava/util/function/Function;)[Lnet/minecraft/text/OrderedText;
-
getTexts
- Mappings:
Namespace Name Mixin selector official cLcuk;c(Z)[Lrq;intermediary method_33830Lnet/minecraft/class_2625;method_33830(Z)[Lnet/minecraft/class_2561;named getTextsLnet/minecraft/block/entity/SignBlockEntity;getTexts(Z)[Lnet/minecraft/text/Text;
-
toUpdatePacket
Description copied from class:BlockEntityReturns the packet to send to nearby players when the block entity's observable state changes, ornullto not send the packet.If the data returned by
initial chunk datais suitable for updates, the following shortcut can be used to create an update packet:BlockEntityUpdateS2CPacket.create(this). The NBT will be passed toBlockEntity.readNbt(net.minecraft.nbt.NbtCompound)on the client."Observable state" is a state that clients can observe without specific interaction. For example,
CampfireBlockEntity's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.To sync block entity data using this method, use
serverWorld.getChunkManager().markForUpdate(this.getPos());.- Overrides:
toUpdatePacketin classBlockEntity- Returns:
- the packet to send to nearby players when the block entity's observable
state changes, or
nullto not send the packet - See Also:
- Mappings:
Namespace Name Mixin selector official cLcuk;c()Ltn;intermediary method_38249Lnet/minecraft/class_2625;method_38249()Lnet/minecraft/class_2622;named toUpdatePacketLnet/minecraft/block/entity/SignBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
-
toInitialChunkDataNbt
Returns the serialized state of this block entity that is observable by clients.This is sent alongside the initial chunk data, as well as when the block entity implements
BlockEntity.toUpdatePacket()and decides to use the defaultBlockEntityUpdateS2CPacket."Observable state" is a state that clients can observe without specific interaction. For example,
CampfireBlockEntity's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.To send all NBT data of this block entity saved to disk, return
BlockEntity.createNbt().- Overrides:
toInitialChunkDataNbtin classBlockEntity- Returns:
- the serialized state of this block entity that is observable by clients
- See Also:
- Mappings:
Namespace Name Mixin selector official aa_Lcti;aa_()Lpj;intermediary method_16887Lnet/minecraft/class_2586;method_16887()Lnet/minecraft/class_2487;named toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt()Lnet/minecraft/nbt/NbtCompound;
-
copyItemDataRequiresOperator
public boolean copyItemDataRequiresOperator()Returns whether the block item should require the player to have operator permissions to copy the block entity data on placement.Block entities that can execute commands should override this to return
true.- Overrides:
copyItemDataRequiresOperatorin classBlockEntity- Returns:
- whether the block item should require the player to have operator permissions to copy the block entity data on placement
- See Also:
- Mappings:
Namespace Name Mixin selector official uLcti;u()Zintermediary method_11011Lnet/minecraft/class_2586;method_11011()Znamed copyItemDataRequiresOperatorLnet/minecraft/block/entity/BlockEntity;copyItemDataRequiresOperator()Z
-
isEditable
public boolean isEditable()- Mappings:
Namespace Name Mixin selector official dLcuk;d()Zintermediary method_11307Lnet/minecraft/class_2625;method_11307()Znamed isEditableLnet/minecraft/block/entity/SignBlockEntity;isEditable()Z
-
setEditable
public void setEditable(boolean editable) - Mappings:
Namespace Name Mixin selector official aLcuk;a(Z)Vintermediary method_11303Lnet/minecraft/class_2625;method_11303(Z)Vnamed setEditableLnet/minecraft/block/entity/SignBlockEntity;setEditable(Z)V
-
setEditor
- Mappings:
Namespace Name Mixin selector official aLcuk;a(Ljava/util/UUID;)Vintermediary method_11306Lnet/minecraft/class_2625;method_11306(Ljava/util/UUID;)Vnamed setEditorLnet/minecraft/block/entity/SignBlockEntity;setEditor(Ljava/util/UUID;)V
-
getEditor
- Mappings:
Namespace Name Mixin selector official fLcuk;f()Ljava/util/UUID;intermediary method_11305Lnet/minecraft/class_2625;method_11305()Ljava/util/UUID;named getEditorLnet/minecraft/block/entity/SignBlockEntity;getEditor()Ljava/util/UUID;
-
onActivate
- Mappings:
Namespace Name Mixin selector official aLcuk;a(Lagh;)Zintermediary method_11301Lnet/minecraft/class_2625;method_11301(Lnet/minecraft/class_3222;)Znamed onActivateLnet/minecraft/block/entity/SignBlockEntity;onActivate(Lnet/minecraft/server/network/ServerPlayerEntity;)Z
-
getCommandSource
- Mappings:
Namespace Name Mixin selector official bLcuk;b(Lagh;)Ldr;intermediary method_11304Lnet/minecraft/class_2625;method_11304(Lnet/minecraft/class_3222;)Lnet/minecraft/class_2168;named getCommandSourceLnet/minecraft/block/entity/SignBlockEntity;getCommandSource(Lnet/minecraft/server/network/ServerPlayerEntity;)Lnet/minecraft/server/command/ServerCommandSource;
-
getTextColor
- Mappings:
Namespace Name Mixin selector official gLcuk;g()Lbzq;intermediary method_16126Lnet/minecraft/class_2625;method_16126()Lnet/minecraft/class_1767;named getTextColorLnet/minecraft/block/entity/SignBlockEntity;getTextColor()Lnet/minecraft/util/DyeColor;
-
setTextColor
- Mappings:
Namespace Name Mixin selector official aLcuk;a(Lbzq;)Zintermediary method_16127Lnet/minecraft/class_2625;method_16127(Lnet/minecraft/class_1767;)Znamed setTextColorLnet/minecraft/block/entity/SignBlockEntity;setTextColor(Lnet/minecraft/util/DyeColor;)Z
-
isGlowingText
public boolean isGlowingText()- Mappings:
Namespace Name Mixin selector official iLcuk;i()Zintermediary method_34271Lnet/minecraft/class_2625;method_34271()Znamed isGlowingTextLnet/minecraft/block/entity/SignBlockEntity;isGlowingText()Z
-
setGlowingText
public boolean setGlowingText(boolean glowingText) - Mappings:
Namespace Name Mixin selector official bLcuk;b(Z)Zintermediary method_34270Lnet/minecraft/class_2625;method_34270(Z)Znamed setGlowingTextLnet/minecraft/block/entity/SignBlockEntity;setGlowingText(Z)Z
-
updateListeners
private void updateListeners()- Mappings:
Namespace Name Mixin selector official jLcuk;j()Vintermediary method_34272Lnet/minecraft/class_2625;method_34272()Vnamed updateListenersLnet/minecraft/block/entity/SignBlockEntity;updateListeners()V
-