public class BannerBlockEntity extends BlockEntity implements Nameable
Modifier and Type | Field and Description |
---|---|
private DyeColor |
baseColor |
private Text |
customName |
private ListTag |
patternListTag |
private boolean |
patternListTagRead |
private List<com.mojang.datafixers.util.Pair<BannerPattern,DyeColor>> |
patterns |
pos, removed, world
Constructor and Description |
---|
BannerBlockEntity() |
BannerBlockEntity(DyeColor baseColor) |
Modifier and Type | Method and Description |
---|---|
void |
fromTag(BlockState state,
CompoundTag tag) |
DyeColor |
getColorForState(Supplier<BlockState> supplier) |
Text |
getCustomName() |
Text |
getName() |
static int |
getPatternCount(ItemStack stack) |
static ListTag |
getPatternListTag(ItemStack stack) |
List<com.mojang.datafixers.util.Pair<BannerPattern,DyeColor>> |
getPatterns() |
ItemStack |
getPickStack(BlockState state) |
static void |
loadFromItemStack(ItemStack stack) |
static List<com.mojang.datafixers.util.Pair<BannerPattern,DyeColor>> |
method_24280(DyeColor dyeColor,
ListTag listTag) |
void |
readFrom(ItemStack stack,
DyeColor baseColor) |
void |
setCustomName(Text customName) |
CompoundTag |
toInitialChunkDataTag() |
CompoundTag |
toTag(CompoundTag tag) |
BlockEntityUpdateS2CPacket |
toUpdatePacket() |
applyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDisplayName, hasCustomName
private boolean patternListTagRead
@Nullable private List<com.mojang.datafixers.util.Pair<BannerPattern,DyeColor>> patterns
public BannerBlockEntity()
public BannerBlockEntity(DyeColor baseColor)
@Environment(value=CLIENT) @Nullable public static ListTag getPatternListTag(ItemStack stack)
@Nullable public Text getCustomName()
getCustomName
in interface Nameable
public void setCustomName(Text customName)
public CompoundTag toTag(CompoundTag tag)
toTag
in class BlockEntity
public void fromTag(BlockState state, CompoundTag tag)
fromTag
in class BlockEntity
@Nullable public BlockEntityUpdateS2CPacket toUpdatePacket()
toUpdatePacket
in class BlockEntity
public CompoundTag toInitialChunkDataTag()
toInitialChunkDataTag
in class BlockEntity
public static int getPatternCount(ItemStack stack)
@Environment(value=CLIENT) public List<com.mojang.datafixers.util.Pair<BannerPattern,DyeColor>> getPatterns()
@Environment(value=CLIENT) public static List<com.mojang.datafixers.util.Pair<BannerPattern,DyeColor>> method_24280(DyeColor dyeColor, @Nullable ListTag listTag)
public static void loadFromItemStack(ItemStack stack)
@Environment(value=CLIENT) public ItemStack getPickStack(BlockState state)
public DyeColor getColorForState(Supplier<BlockState> supplier)