Class BannerBlockEntity
- All Implemented Interfaces:
Nameable
- Mappings:
Namespace Name named net/minecraft/block/entity/BannerBlockEntity
intermediary net/minecraft/class_2573
official doy
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.entity.BlockEntity
BlockEntity.ComponentsAccess
-
Field Summary
Modifier and TypeFieldDescriptionprivate DyeColor
private static final Logger
static final int
private BannerPatternsComponent
private static final String
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
-
Constructor Summary
ConstructorDescriptionBannerBlockEntity
(BlockPos pos, BlockState state) BannerBlockEntity
(BlockPos pos, BlockState state, DyeColor baseColor) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addComponents
(ComponentMap.Builder componentMapBuilder) Returns the custom name of this object, ornull
if there is none.getName()
Returns the name of this object.protected void
readComponents
(BlockEntity.ComponentsAccess components) void
protected void
readNbt
(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Reads data fromnbt
.void
toInitialChunkDataNbt
(RegistryWrapper.WrapperLookup registryLookup) 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, ornull
to not send the packet.protected void
writeNbt
(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Writes data tonbt
.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createComponentlessNbt, createComponentlessNbtWithIdentifyingData, createComponentMap, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getComponents, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, read, readComponentlessNbt, readComponents, readComponents, setCachedState, setComponents, setStackNbt, setWorld, tryParseCustomName, writeIdToNbt
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.util.Nameable
getDisplayName, hasCustomName
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGER
Lnet/minecraft/block/entity/BannerBlockEntity;LOGGER:Lorg/slf4j/Logger;
intermediary field_49402
Lnet/minecraft/class_2573;field_49402:Lorg/slf4j/Logger;
official b
Ldoy;b:Lorg/slf4j/Logger;
-
MAX_PATTERN_COUNT
public static final int MAX_PATTERN_COUNT- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_PATTERN_COUNT
Lnet/minecraft/block/entity/BannerBlockEntity;MAX_PATTERN_COUNT:I
intermediary field_31296
Lnet/minecraft/class_2573;field_31296:I
official a
Ldoy;a:I
-
PATTERNS_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named PATTERNS_KEY
Lnet/minecraft/block/entity/BannerBlockEntity;PATTERNS_KEY:Ljava/lang/String;
intermediary field_31297
Lnet/minecraft/class_2573;field_31297:Ljava/lang/String;
official c
Ldoy;c:Ljava/lang/String;
-
customName
- Mappings:
Namespace Name Mixin selector named customName
Lnet/minecraft/block/entity/BannerBlockEntity;customName:Lnet/minecraft/text/Text;
intermediary field_11772
Lnet/minecraft/class_2573;field_11772:Lnet/minecraft/class_2561;
official d
Ldoy;d:Lxp;
-
baseColor
- Mappings:
Namespace Name Mixin selector named baseColor
Lnet/minecraft/block/entity/BannerBlockEntity;baseColor:Lnet/minecraft/util/DyeColor;
intermediary field_11774
Lnet/minecraft/class_2573;field_11774:Lnet/minecraft/class_1767;
official e
Ldoy;e:Lctk;
-
patterns
- Mappings:
Namespace Name Mixin selector named patterns
Lnet/minecraft/block/entity/BannerBlockEntity;patterns:Lnet/minecraft/component/type/BannerPatternsComponent;
intermediary field_49756
Lnet/minecraft/class_2573;field_49756:Lnet/minecraft/class_9307;
official f
Ldoy;f:Ldpa;
-
-
Constructor Details
-
BannerBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/block/entity/BannerBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
intermediary <init>
Lnet/minecraft/class_2573;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
official <init>
Ldoy;<init>(Liz;Ldse;)V
-
BannerBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/block/entity/BannerBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/DyeColor;)V
intermediary <init>
Lnet/minecraft/class_2573;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1767;)V
official <init>
Ldoy;<init>(Liz;Ldse;Lctk;)V
-
-
Method Details
-
readFrom
- Mappings:
Namespace Name Mixin selector named readFrom
Lnet/minecraft/block/entity/BannerBlockEntity;readFrom(Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/DyeColor;)V
intermediary method_10913
Lnet/minecraft/class_2573;method_10913(Lnet/minecraft/class_1799;Lnet/minecraft/class_1767;)V
official a
Ldoy;a(Lcur;Lctk;)V
-
getName
Returns the name of this object.This should return the custom name if it exists, otherwise the default name. This should not have styling applied.
- Specified by:
getName
in interfaceNameable
- Returns:
- the name of this object
- Mappings:
Namespace Name Mixin selector named getName
Lnet/minecraft/util/Nameable;getName()Lnet/minecraft/text/Text;
intermediary method_5477
Lnet/minecraft/class_1275;method_5477()Lnet/minecraft/class_2561;
official af
Lbrb;af()Lxp;
-
getCustomName
Returns the custom name of this object, ornull
if there is none.- Specified by:
getCustomName
in interfaceNameable
- Returns:
- the custom name of this object, or
null
if there is none - Mappings:
Namespace Name Mixin selector named getCustomName
Lnet/minecraft/util/Nameable;getCustomName()Lnet/minecraft/text/Text;
intermediary method_5797
Lnet/minecraft/class_1275;method_5797()Lnet/minecraft/class_2561;
official ah
Lbrb;ah()Lxp;
-
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:
writeNbt
in classBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector named writeNbt
Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
intermediary method_11007
Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
official b
Ldpj;b(Lus;Ljk$a;)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.
nbt
might 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:
readNbt
in classBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector named readNbt
Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
intermediary method_11014
Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
official a
Ldpj;a(Lus;Ljk$a;)V
-
toUpdatePacket
Description copied from class:BlockEntity
Returns the packet to send to nearby players when the block entity's observable state changes, ornull
to not send the packet.If the data returned by
initial chunk data
is 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, net.minecraft.registry.RegistryWrapper.WrapperLookup)
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:
toUpdatePacket
in classBlockEntity
- Returns:
- the packet to send to nearby players when the block entity's observable
state changes, or
null
to not send the packet - See Also:
- Mappings:
Namespace Name Mixin selector named toUpdatePacket
Lnet/minecraft/block/entity/BannerBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
intermediary method_16886
Lnet/minecraft/class_2573;method_16886()Lnet/minecraft/class_2622;
official a
Ldoy;a()Lacp;
-
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
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(net.minecraft.registry.RegistryWrapper.WrapperLookup)
.- Overrides:
toInitialChunkDataNbt
in classBlockEntity
- Returns:
- the serialized state of this block entity that is observable by clients
- See Also:
- Mappings:
Namespace Name Mixin selector named toInitialChunkDataNbt
Lnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
intermediary method_16887
Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;
official a
Ldpj;a(Ljk$a;)Lus;
-
getPatterns
- Mappings:
Namespace Name Mixin selector named getPatterns
Lnet/minecraft/block/entity/BannerBlockEntity;getPatterns()Lnet/minecraft/component/type/BannerPatternsComponent;
intermediary method_58122
Lnet/minecraft/class_2573;method_58122()Lnet/minecraft/class_9307;
official b
Ldoy;b()Ldpa;
-
getPickStack
- Mappings:
Namespace Name Mixin selector named getPickStack
Lnet/minecraft/block/entity/BannerBlockEntity;getPickStack()Lnet/minecraft/item/ItemStack;
intermediary method_10907
Lnet/minecraft/class_2573;method_10907()Lnet/minecraft/class_1799;
official c
Ldoy;c()Lcur;
-
getColorForState
- Mappings:
Namespace Name Mixin selector named getColorForState
Lnet/minecraft/block/entity/BannerBlockEntity;getColorForState()Lnet/minecraft/util/DyeColor;
intermediary method_10908
Lnet/minecraft/class_2573;method_10908()Lnet/minecraft/class_1767;
official f
Ldoy;f()Lctk;
-
readComponents
- Overrides:
readComponents
in classBlockEntity
- Mappings:
Namespace Name Mixin selector named readComponents
Lnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/block/entity/BlockEntity$ComponentsAccess;)V
intermediary method_57568
Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_2586$class_9473;)V
official a
Ldpj;a(Ldpj$b;)V
-
addComponents
- Overrides:
addComponents
in classBlockEntity
- Mappings:
Namespace Name Mixin selector named addComponents
Lnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)V
intermediary method_57567
Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)V
official a
Ldpj;a(Lki$a;)V
-
removeFromCopiedStackNbt
- Overrides:
removeFromCopiedStackNbt
in classBlockEntity
- Mappings:
Namespace Name Mixin selector named removeFromCopiedStackNbt
Lnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackNbt(Lnet/minecraft/nbt/NbtCompound;)V
intermediary method_57569
Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_2487;)V
official a
Ldpj;a(Lus;)V
-