Package net.minecraft.inventory
Interface SingleStackInventory
- All Known Subinterfaces:
SingleStackInventory.SingleStackBlockEntityInventory
- All Known Implementing Classes:
DecoratedPotBlockEntity,JukeboxBlockEntity
An inventory that holds exactly one
ItemStack, at slot 0.- Mappings:
Namespace Name named net/minecraft/inventory/SingleStackInventoryintermediary net/minecraft/class_8181official eyn
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface -
Field Summary
Fields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGE -
Method Summary
Modifier and TypeMethodDescriptiondefault voidclear()default ItemStackdecreaseStack(int count) default ItemStackgetStack()default ItemStackgetStack(int slot) Returns the stack currently stored atslot.default booleanisEmpty()Returns whether the inventory consists entirely of empty item stacks.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.voiddefault intsize()Returns the size of the inventory.Methods inherited from interface net.minecraft.inventory.Inventory
canPlayerUse, canTransferTo, containsAny, containsAny, count, getMaxCount, getMaxCountPerStack, isValid, markDirty, onClose, onOpen
-
Method Details
-
getStack
ItemStack getStack()- Mappings:
Namespace Name Mixin selector named getStackLnet/minecraft/inventory/SingleStackInventory;getStack()Lnet/minecraft/item/ItemStack;intermediary method_54079Lnet/minecraft/class_8181;method_54079()Lnet/minecraft/class_1799;official fLeyn;f()Lcuq;
-
decreaseStack
- Mappings:
Namespace Name Mixin selector named decreaseStackLnet/minecraft/inventory/SingleStackInventory;decreaseStack(I)Lnet/minecraft/item/ItemStack;intermediary method_54078Lnet/minecraft/class_8181;method_54078(I)Lnet/minecraft/class_1799;official cLeyn;c(I)Lcuq;
-
setStack
- Mappings:
Namespace Name Mixin selector named setStackLnet/minecraft/inventory/SingleStackInventory;setStack(Lnet/minecraft/item/ItemStack;)Vintermediary method_54077Lnet/minecraft/class_8181;method_54077(Lnet/minecraft/class_1799;)Vofficial bLeyn;b(Lcuq;)V
-
emptyStack
- Mappings:
Namespace Name Mixin selector named emptyStackLnet/minecraft/inventory/SingleStackInventory;emptyStack()Lnet/minecraft/item/ItemStack;intermediary method_54099Lnet/minecraft/class_8181;method_54099()Lnet/minecraft/class_1799;official hLeyn;h()Lcuq;
-
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. -
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 cLbqk;c()Z
-
clear
default void clear() -
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 bLbqk;b(I)Lcuq;
-
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 aLbqk;a(I)Lcuq;
-
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 aLbqk;a(II)Lcuq;
-
setStack
Sets the stack stored atslottostack.
-