Class ChiseledBookshelfBlockEntity
- All Implemented Interfaces:
Clearable
- Mappings:
Namespace Name official cvtintermediary net/minecraft/class_7716named net/minecraft/block/entity/ChiseledBookshelfBlockEntity
-
Field Summary
FieldsFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclear()intprivate static DefaultedList<ItemStack>getBooksAsList(Collection<ItemStack> books) booleanisEmpty()booleanisFull()voidreadNbt(NbtCompound nbt) Reads data fromnbt.Returns the serialized state of this block entity that is observable by clients.protected voidwriteNbt(NbtCompound nbt) Writes data tonbt.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, toUpdatePacket, writeIdToNbt
-
Field Details
-
MAX_BOOKS
public static final int MAX_BOOKS- See Also:
- Mappings:
Namespace Name Mixin selector official aLcvt;a:Iintermediary field_40331Lnet/minecraft/class_7716;field_40331:Inamed MAX_BOOKSLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;MAX_BOOKS:I
-
books
- Mappings:
Namespace Name Mixin selector official bLcvt;b:Ljava/util/Deque;intermediary field_40332Lnet/minecraft/class_7716;field_40332:Ljava/util/Deque;named booksLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;books:Ljava/util/Deque;
-
-
Constructor Details
-
ChiseledBookshelfBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>Lcvt;<init>(Lgr;Lcxu;)Vintermediary <init>Lnet/minecraft/class_7716;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed <init>Lnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
getLastBook
- Mappings:
Namespace Name Mixin selector official cLcvt;c()Lccw;intermediary method_45464Lnet/minecraft/class_7716;method_45464()Lnet/minecraft/class_1799;named getLastBookLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;getLastBook()Lnet/minecraft/item/ItemStack;
-
addBook
- Mappings:
Namespace Name Mixin selector official aLcvt;a(Lccw;)Vintermediary method_45462Lnet/minecraft/class_7716;method_45462(Lnet/minecraft/class_1799;)Vnamed addBookLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;addBook(Lnet/minecraft/item/ItemStack;)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 aLcvm;a(Lqf;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)Vnamed readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
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 bLcvm;b(Lqf;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)Vnamed writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
getBooksAsList
- Mappings:
Namespace Name Mixin selector official aLcvt;a(Ljava/util/Collection;)Lhh;intermediary method_45463Lnet/minecraft/class_7716;method_45463(Ljava/util/Collection;)Lnet/minecraft/class_2371;named getBooksAsListLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;getBooksAsList(Ljava/util/Collection;)Lnet/minecraft/util/collection/DefaultedList;
-
method_45465
- Mappings:
Namespace Name Mixin selector official dLcvt;d()Lui;intermediary method_45465Lnet/minecraft/class_7716;method_45465()Lnet/minecraft/class_2622;named method_45465Lnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;method_45465()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 ac_Lcvm;ac_()Lqf;intermediary method_16887Lnet/minecraft/class_2586;method_16887()Lnet/minecraft/class_2487;named toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt()Lnet/minecraft/nbt/NbtCompound;
-
clear
public void clear() -
getBookCount
public int getBookCount()- Mappings:
Namespace Name Mixin selector official fLcvt;f()Iintermediary method_45466Lnet/minecraft/class_7716;method_45466()Inamed getBookCountLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;getBookCount()I
-
isFull
public boolean isFull()- Mappings:
Namespace Name Mixin selector official gLcvt;g()Zintermediary method_45467Lnet/minecraft/class_7716;method_45467()Znamed isFullLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;isFull()Z
-
isEmpty
public boolean isEmpty()- Mappings:
Namespace Name Mixin selector official iLcvt;i()Zintermediary method_45468Lnet/minecraft/class_7716;method_45468()Znamed isEmptyLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;isEmpty()Z
-