Class ChiseledBookshelfBlockEntity
- All Implemented Interfaces:
Iterable<ItemStack>,Inventory,ListInventory,Clearable,DebugTrackable
- Mappings:
Namespace Name named net/minecraft/block/entity/ChiseledBookshelfBlockEntityintermediary net/minecraft/class_7716official egq
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.debug.DebugTrackable
DebugTrackable.DebugDataSupplier<T>, DebugTrackable.TrackerNested classes/interfaces inherited from interface net.minecraft.inventory.Inventory
Inventory.Iterator -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final DefaultedList<ItemStack> private intprivate static final Loggerstatic final intFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, worldFields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddComponents(ComponentMap.Builder builder) booleanbooleancanPlayerUse(PlayerEntity player) Returns whetherplayercan use this inventory.booleancanTransferTo(Inventory hopperInventory, int slot, ItemStack stack) Returns whether a hopper can transferstackfromslotto the hopper.intintReturns the maximum number of items a stack can contain when placed inside this inventory.protected voidreadComponents(ComponentsAccess components) protected voidReads data fromnbt.voidremoveStack(int slot, int amount) Removes a specific number of items fromslot.voidSets the stack stored atslottostack.private voidupdateState(int interactedSlot) protected voidWrites data tonbt.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, createComponentlessNbt, createComponentMap, createFromNbt, createNbt, createNbtWithIdentifyingData, getCachedState, getComponents, getNameForReport, getPos, getReporterContext, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onBlockReplaced, onSyncedBlockEvent, populateCrashReport, posFromNbt, read, readComponentlessData, readComponents, readComponents, registerTracking, setCachedState, setComponents, setWorld, supports, toInitialChunkDataNbt, toUpdatePacket, tryParseCustomName, writeComponentlessData, writeDataWithId, writeDataWithoutId, writeFullData, writeIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.inventory.Inventory
containsAny, containsAny, count, getMaxCount, getViewingUsers, iterator, markDirty, onClose, onOpenMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.inventory.ListInventory
clear, getFilledSlotCount, getStack, isEmpty, isValid, removeStack, setStackNoMarkDirty, size
-
Field Details
-
MAX_BOOKS
public static final int MAX_BOOKS- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_BOOKSLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;MAX_BOOKS:Iintermediary field_40331Lnet/minecraft/class_7716;field_40331:Iofficial bLegq;b:I
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;LOGGER:Lorg/slf4j/Logger;intermediary field_40898Lnet/minecraft/class_7716;field_40898:Lorg/slf4j/Logger;official cLegq;c:Lorg/slf4j/Logger;
-
DEFAULT_LAST_INTERACTED_SLOT
private static final int DEFAULT_LAST_INTERACTED_SLOT- See Also:
- Mappings:
Namespace Name Mixin selector named DEFAULT_LAST_INTERACTED_SLOTLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;DEFAULT_LAST_INTERACTED_SLOT:Iintermediary field_57771Lnet/minecraft/class_7716;field_57771:Iofficial dLegq;d:I
-
heldStacks
- Mappings:
Namespace Name Mixin selector named heldStacksLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;heldStacks:Lnet/minecraft/util/collection/DefaultedList;intermediary field_41314Lnet/minecraft/class_7716;field_41314:Lnet/minecraft/class_2371;official eLegq;e:Ljt;
-
lastInteractedSlot
private int lastInteractedSlot- Mappings:
Namespace Name Mixin selector named lastInteractedSlotLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;lastInteractedSlot:Iintermediary field_41601Lnet/minecraft/class_7716;field_41601:Iofficial fLegq;f:I
-
-
Constructor Details
-
ChiseledBookshelfBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary <init>Lnet/minecraft/class_7716;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Legq;<init>(Lja;Lejm;)V
-
-
Method Details
-
updateState
private void updateState(int interactedSlot) - Mappings:
Namespace Name Mixin selector named updateStateLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;updateState(I)Vintermediary method_47585Lnet/minecraft/class_7716;method_47585(I)Vofficial cLegq;c(I)V
-
readData
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:
readDatain classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named readDataLnet/minecraft/block/entity/BlockEntity;readData(Lnet/minecraft/storage/ReadView;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_11368;)Vofficial aLegg;a(Lfip;)V
-
writeData
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:
writeDatain classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named writeDataLnet/minecraft/block/entity/BlockEntity;writeData(Lnet/minecraft/storage/WriteView;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_11372;)Vofficial aLegg;a(Lfir;)V
-
getMaxCountPerStack
public int getMaxCountPerStack()Returns the maximum number of items a stack can contain when placed inside this inventory.No slots may have more than this number of items. It is effectively the stacking limit for this inventory's slots.
- Specified by:
getMaxCountPerStackin interfaceInventory- Returns:
- the maximum number of items a stack can contain when placed inside this inventory
- Mappings:
Namespace Name Mixin selector named getMaxCountPerStackLnet/minecraft/inventory/Inventory;getMaxCountPerStack()Iintermediary method_5444Lnet/minecraft/class_1263;method_5444()Iofficial ap_Lcbj;ap_()I
-
canAccept
- Specified by:
canAcceptin interfaceListInventory- Mappings:
Namespace Name Mixin selector named canAcceptLnet/minecraft/inventory/ListInventory;canAccept(Lnet/minecraft/item/ItemStack;)Zintermediary method_72651Lnet/minecraft/class_11596;method_72651(Lnet/minecraft/class_1799;)Zofficial bLehp;b(Ldhp;)Z
-
removeStack
Removes a specific number of items fromslot.- Specified by:
removeStackin interfaceInventory- Specified by:
removeStackin interfaceListInventory- Returns:
- the removed items as a stack
- Mappings:
Namespace Name Mixin selector named removeStackLnet/minecraft/inventory/Inventory;removeStack(II)Lnet/minecraft/item/ItemStack;intermediary method_5434Lnet/minecraft/class_1263;method_5434(II)Lnet/minecraft/class_1799;official aLcbj;a(II)Ldhp;
-
setStack
Sets the stack stored atslottostack.- Specified by:
setStackin interfaceInventory- Specified by:
setStackin interfaceListInventory- Mappings:
Namespace Name Mixin selector named setStackLnet/minecraft/inventory/Inventory;setStack(ILnet/minecraft/item/ItemStack;)Vintermediary method_5447Lnet/minecraft/class_1263;method_5447(ILnet/minecraft/class_1799;)Vofficial aLcbj;a(ILdhp;)V
-
canTransferTo
Returns whether a hopper can transferstackfromslotto the hopper.This returns
trueby default.- Specified by:
canTransferToin interfaceInventory- Returns:
- whether a hopper can transfer
stackfromslotto the hopper - Mappings:
Namespace Name Mixin selector named canTransferToLnet/minecraft/inventory/Inventory;canTransferTo(Lnet/minecraft/inventory/Inventory;ILnet/minecraft/item/ItemStack;)Zintermediary method_49104Lnet/minecraft/class_1263;method_49104(Lnet/minecraft/class_1263;ILnet/minecraft/class_1799;)Zofficial aLcbj;a(Lcbj;ILdhp;)Z
-
getHeldStacks
- Specified by:
getHeldStacksin interfaceListInventory- Mappings:
Namespace Name Mixin selector named getHeldStacksLnet/minecraft/inventory/ListInventory;getHeldStacks()Lnet/minecraft/util/collection/DefaultedList;intermediary method_72652Lnet/minecraft/class_11596;method_72652()Lnet/minecraft/class_2371;official hLehp;h()Ljt;
-
canPlayerUse
Returns whetherplayercan use this inventory.This is called by
ScreenHandler.canUse(net.minecraft.screen.ScreenHandlerContext, net.minecraft.entity.player.PlayerEntity, net.minecraft.block.Block).- Specified by:
canPlayerUsein interfaceInventory- Returns:
- whether
playercan use this inventory - See Also:
- API Note:
- Implementations should check the distance between the inventory
holder and
player. For convenience, this interface offers two methods used by block entities to implement this check. - Mappings:
Namespace Name Mixin selector named canPlayerUseLnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Zintermediary method_5443Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Zofficial aLcbj;a(Lczl;)Z
-
getLastInteractedSlot
public int getLastInteractedSlot()- Mappings:
Namespace Name Mixin selector named getLastInteractedSlotLnet/minecraft/block/entity/ChiseledBookshelfBlockEntity;getLastInteractedSlot()Iintermediary method_47887Lnet/minecraft/class_7716;method_47887()Iofficial kLegq;k()I
-
readComponents
- Overrides:
readComponentsin classBlockEntity- Mappings:
Namespace Name Mixin selector named readComponentsLnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/component/ComponentsAccess;)Vintermediary method_57568Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_9473;)Vofficial aLegg;a(Lkk;)V
-
addComponents
- Overrides:
addComponentsin classBlockEntity- Mappings:
Namespace Name Mixin selector named addComponentsLnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)Vintermediary method_57567Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)Vofficial aLegg;a(Lkm$a;)V
-
removeFromCopiedStackData
- Overrides:
removeFromCopiedStackDatain classBlockEntity- Mappings:
Namespace Name Mixin selector named removeFromCopiedStackDataLnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackData(Lnet/minecraft/storage/WriteView;)Vintermediary method_57569Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_11372;)Vofficial bLegg;b(Lfir;)V
-