Package net.minecraft
Interface class_11596
- All Known Implementing Classes:
ChiseledBookshelfBlockEntity,class_11597
- Mappings:
Namespace Name named net/minecraft/class_11596intermediary net/minecraft/class_11596official edk
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.inventory.Inventory
Inventory.Iterator -
Field Summary
Fields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGE -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanTransferTo(Inventory hopperInventory, int slot, ItemStack stack) Returns whether a hopper can transferstackfromslotto the hopper.default voidclear()default ItemStackgetStack(int slot) Returns the stack currently stored atslot.default booleanisEmpty()Returns whether the inventory consists entirely of empty item stacks.default booleanReturns whetherstackis valid for theslot.default booleanmethod_72651(ItemStack itemStack) default intdefault voidmethod_72664(int int2, ItemStack itemStack) default ItemStackremoveStack(int slot) Removes the stack currently stored atslot.default ItemStackremoveStack(int slot, int amount) Removes a specific number of items fromslot.default voidSets the stack stored atslottostack.default intsize()Returns the size of the inventory.Methods inherited from interface net.minecraft.inventory.Inventory
canPlayerUse, containsAny, containsAny, count, getMaxCount, getMaxCountPerStack, iterator, markDirty, method_72379, onClose, onOpenMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
method_72652
DefaultedList<ItemStack> method_72652()- Mappings:
Namespace Name Mixin selector named method_72652Lnet/minecraft/class_11596;method_72652()Lnet/minecraft/util/collection/DefaultedList;intermediary method_72652Lnet/minecraft/class_11596;method_72652()Lnet/minecraft/class_2371;official hLedk;h()Lju;
-
method_72663
default int method_72663()- Mappings:
Namespace Name Mixin selector named method_72663Lnet/minecraft/class_11596;method_72663()Iintermediary method_72663Lnet/minecraft/class_11596;method_72663()Iofficial aB_Ledk;aB_()I
-
size
default int size()Returns the size of the inventory.The inventory should support the slot ID from
0tosize() - 1. This should remain constant throughout the inventory's lifetime. -
clear
default void clear() -
isEmpty
default boolean isEmpty()Returns whether the inventory consists entirely of empty item stacks.- Specified by:
isEmptyin interfaceInventory- Returns:
- whether the inventory consists entirely of empty item stacks
- Mappings:
Namespace Name Mixin selector named isEmptyLnet/minecraft/inventory/Inventory;isEmpty()Zintermediary method_5442Lnet/minecraft/class_1263;method_5442()Zofficial cLbxm;c()Z
-
getStack
Returns the stack currently stored atslot.If the slot is empty, or is outside the bounds of this inventory, this returns
ItemStack.EMPTY.- Specified by:
getStackin interfaceInventory- Returns:
- the stack currently stored at
slot - Mappings:
Namespace Name Mixin selector named getStackLnet/minecraft/inventory/Inventory;getStack(I)Lnet/minecraft/item/ItemStack;intermediary method_5438Lnet/minecraft/class_1263;method_5438(I)Lnet/minecraft/class_1799;official aLbxm;a(I)Lddo;
-
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 aLbxm;a(Lbxm;ILddo;)Z
-
removeStack
Removes a specific number of items fromslot.- Specified by:
removeStackin interfaceInventory- 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 aLbxm;a(II)Lddo;
-
removeStack
Removes the stack currently stored atslot.- Specified by:
removeStackin interfaceInventory- Returns:
- the stack previously stored at the indicated slot
- Mappings:
Namespace Name Mixin selector named removeStackLnet/minecraft/inventory/Inventory;removeStack(I)Lnet/minecraft/item/ItemStack;intermediary method_5441Lnet/minecraft/class_1263;method_5441(I)Lnet/minecraft/class_1799;official bLbxm;b(I)Lddo;
-
isValid
Returns whetherstackis valid for theslot.Implementations can, for example, use this to check whether the item is in a specific tag. This returns
trueby default.- Specified by:
isValidin interfaceInventory- Returns:
- whether
stackis valid for theslot - Mappings:
Namespace Name Mixin selector named isValidLnet/minecraft/inventory/Inventory;isValid(ILnet/minecraft/item/ItemStack;)Zintermediary method_5437Lnet/minecraft/class_1263;method_5437(ILnet/minecraft/class_1799;)Zofficial bLbxm;b(ILddo;)Z
-
method_72651
- Mappings:
Namespace Name Mixin selector named method_72651Lnet/minecraft/class_11596;method_72651(Lnet/minecraft/item/ItemStack;)Zintermediary method_72651Lnet/minecraft/class_11596;method_72651(Lnet/minecraft/class_1799;)Zofficial bLedk;b(Lddo;)Z
-
setStack
Sets the stack stored atslottostack. -
method_72664
- Mappings:
Namespace Name Mixin selector named method_72664Lnet/minecraft/class_11596;method_72664(ILnet/minecraft/item/ItemStack;)Vintermediary method_72664Lnet/minecraft/class_11596;method_72664(ILnet/minecraft/class_1799;)Vofficial cLedk;c(ILddo;)V
-