Package net.minecraft.inventory
Class Inventories
java.lang.Object
net.minecraft.inventory.Inventories
public class Inventories extends Object
- Mappings:
Namespace Name official aqdintermediary net/minecraft/class_1262named net/minecraft/inventory/Inventories
-
Constructor Summary
Constructors Constructor Description Inventories() -
Method Summary
Modifier and Type Method Description static voidreadNbt(CompoundTag tag, DefaultedList<ItemStack> stacks)static intremove(Inventory inventory, Predicate<ItemStack> shouldRemove, int maxCount, boolean dryRun)Removes a number, not exceedingmaxCount, of items from an inventory based on a predicate and returns that number.static intremove(ItemStack stack, Predicate<ItemStack> shouldRemove, int maxCount, boolean dryRun)Removes a number, not exceedingmaxCount, of items from an item stack based on a predicate and returns that number.static ItemStackremoveStack(List<ItemStack> stacks, int slot)static ItemStacksplitStack(List<ItemStack> stacks, int slot, int amount)static CompoundTagwriteNbt(CompoundTag tag, DefaultedList<ItemStack> stacks)static CompoundTagwriteNbt(CompoundTag tag, DefaultedList<ItemStack> stacks, boolean setIfEmpty)
-
Constructor Details
-
Inventories
public Inventories()
-
-
Method Details
-
splitStack
- Mappings:
Namespace Name Mixin selector official aLaqd;a(Ljava/util/List;II)Lboq;intermediary method_5430Lnet/minecraft/class_1262;method_5430(Ljava/util/List;II)Lnet/minecraft/class_1799;named splitStackLnet/minecraft/inventory/Inventories;splitStack(Ljava/util/List;II)Lnet/minecraft/item/ItemStack;
-
removeStack
- Mappings:
Namespace Name Mixin selector official aLaqd;a(Ljava/util/List;I)Lboq;intermediary method_5428Lnet/minecraft/class_1262;method_5428(Ljava/util/List;I)Lnet/minecraft/class_1799;named removeStackLnet/minecraft/inventory/Inventories;removeStack(Ljava/util/List;I)Lnet/minecraft/item/ItemStack;
-
writeNbt
- Mappings:
Namespace Name Mixin selector official aLaqd;a(Lmr;Lgj;)Lmr;intermediary method_5426Lnet/minecraft/class_1262;method_5426(Lnet/minecraft/class_2487;Lnet/minecraft/class_2371;)Lnet/minecraft/class_2487;named writeNbtLnet/minecraft/inventory/Inventories;writeNbt(Lnet/minecraft/nbt/CompoundTag;Lnet/minecraft/util/collection/DefaultedList;)Lnet/minecraft/nbt/CompoundTag;
-
writeNbt
public static CompoundTag writeNbt(CompoundTag tag, DefaultedList<ItemStack> stacks, boolean setIfEmpty)- Mappings:
Namespace Name Mixin selector official aLaqd;a(Lmr;Lgj;Z)Lmr;intermediary method_5427Lnet/minecraft/class_1262;method_5427(Lnet/minecraft/class_2487;Lnet/minecraft/class_2371;Z)Lnet/minecraft/class_2487;named writeNbtLnet/minecraft/inventory/Inventories;writeNbt(Lnet/minecraft/nbt/CompoundTag;Lnet/minecraft/util/collection/DefaultedList;Z)Lnet/minecraft/nbt/CompoundTag;
-
readNbt
- Mappings:
Namespace Name Mixin selector official bLaqd;b(Lmr;Lgj;)Vintermediary method_5429Lnet/minecraft/class_1262;method_5429(Lnet/minecraft/class_2487;Lnet/minecraft/class_2371;)Vnamed readNbtLnet/minecraft/inventory/Inventories;readNbt(Lnet/minecraft/nbt/CompoundTag;Lnet/minecraft/util/collection/DefaultedList;)V
-
remove
public static int remove(Inventory inventory, Predicate<ItemStack> shouldRemove, int maxCount, boolean dryRun)Removes a number, not exceedingmaxCount, of items from an inventory based on a predicate and returns that number.- Parameters:
dryRun- whether to return the number of items which would have been removed without actually removing them- Returns:
- the number of items removed
- Mappings:
Namespace Name Mixin selector official aLaqd;a(Laqc;Ljava/util/function/Predicate;IZ)Iintermediary method_29234Lnet/minecraft/class_1262;method_29234(Lnet/minecraft/class_1263;Ljava/util/function/Predicate;IZ)Inamed removeLnet/minecraft/inventory/Inventories;remove(Lnet/minecraft/inventory/Inventory;Ljava/util/function/Predicate;IZ)I
-
remove
public static int remove(ItemStack stack, Predicate<ItemStack> shouldRemove, int maxCount, boolean dryRun)Removes a number, not exceedingmaxCount, of items from an item stack based on a predicate and returns that number.- Parameters:
dryRun- whether to return the number of items which would have been removed without actually removing them- Returns:
- the number of items removed
- Mappings:
Namespace Name Mixin selector official aLaqd;a(Lboq;Ljava/util/function/Predicate;IZ)Iintermediary method_29235Lnet/minecraft/class_1262;method_29235(Lnet/minecraft/class_1799;Ljava/util/function/Predicate;IZ)Inamed removeLnet/minecraft/inventory/Inventories;remove(Lnet/minecraft/item/ItemStack;Ljava/util/function/Predicate;IZ)I
-