类 Inventories


  • public class Inventories
    extends Object
    Mappings:
    Namespace Name
    official ara
    intermediary net/minecraft/class_1262
    named net/minecraft/inventory/Inventories
    • 构造器详细资料

      • Inventories

        public Inventories()
    • 方法详细资料

      • splitStack

        public static ItemStack splitStack​(List<ItemStack> stacks,
                                           int slot,
                                           int amount)
        Mappings:
        Namespace Name Mixin selector
        official a Lara;a(Ljava/util/List;II)Lbpr;
        intermediary method_5430 Lnet/minecraft/class_1262;method_5430(Ljava/util/List;II)Lnet/minecraft/class_1799;
        named splitStack Lnet/minecraft/inventory/Inventories;splitStack(Ljava/util/List;II)Lnet/minecraft/item/ItemStack;
      • removeStack

        public static ItemStack removeStack​(List<ItemStack> stacks,
                                            int slot)
        Mappings:
        Namespace Name Mixin selector
        official a Lara;a(Ljava/util/List;I)Lbpr;
        intermediary method_5428 Lnet/minecraft/class_1262;method_5428(Ljava/util/List;I)Lnet/minecraft/class_1799;
        named removeStack Lnet/minecraft/inventory/Inventories;removeStack(Ljava/util/List;I)Lnet/minecraft/item/ItemStack;
      • writeNbt

        public static CompoundTag writeNbt​(CompoundTag nbt,
                                           DefaultedList<ItemStack> stacks)
        Mappings:
        Namespace Name Mixin selector
        official a Lara;a(Lmv;Lgn;)Lmv;
        intermediary method_5426 Lnet/minecraft/class_1262;method_5426(Lnet/minecraft/class_2487;Lnet/minecraft/class_2371;)Lnet/minecraft/class_2487;
        named writeNbt Lnet/minecraft/inventory/Inventories;writeNbt(Lnet/minecraft/nbt/CompoundTag;Lnet/minecraft/util/collection/DefaultedList;)Lnet/minecraft/nbt/CompoundTag;
      • writeNbt

        public static CompoundTag writeNbt​(CompoundTag nbt,
                                           DefaultedList<ItemStack> stacks,
                                           boolean setIfEmpty)
        Mappings:
        Namespace Name Mixin selector
        official a Lara;a(Lmv;Lgn;Z)Lmv;
        intermediary method_5427 Lnet/minecraft/class_1262;method_5427(Lnet/minecraft/class_2487;Lnet/minecraft/class_2371;Z)Lnet/minecraft/class_2487;
        named writeNbt Lnet/minecraft/inventory/Inventories;writeNbt(Lnet/minecraft/nbt/CompoundTag;Lnet/minecraft/util/collection/DefaultedList;Z)Lnet/minecraft/nbt/CompoundTag;
      • readNbt

        public static void readNbt​(CompoundTag nbt,
                                   DefaultedList<ItemStack> stacks)
        Mappings:
        Namespace Name Mixin selector
        official b Lara;b(Lmv;Lgn;)V
        intermediary method_5429 Lnet/minecraft/class_1262;method_5429(Lnet/minecraft/class_2487;Lnet/minecraft/class_2371;)V
        named readNbt Lnet/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 exceeding maxCount, of items from an inventory based on a predicate and returns that number.
        参数:
        dryRun - whether to return the number of items which would have been removed without actually removing them
        返回:
        the number of items removed
        Mappings:
        Namespace Name Mixin selector
        official a Lara;a(Laqz;Ljava/util/function/Predicate;IZ)I
        intermediary method_29234 Lnet/minecraft/class_1262;method_29234(Lnet/minecraft/class_1263;Ljava/util/function/Predicate;IZ)I
        named remove Lnet/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 exceeding maxCount, of items from an item stack based on a predicate and returns that number.
        参数:
        dryRun - whether to return the number of items which would have been removed without actually removing them
        返回:
        the number of items removed
        Mappings:
        Namespace Name Mixin selector
        official a Lara;a(Lbpr;Ljava/util/function/Predicate;IZ)I
        intermediary method_29235 Lnet/minecraft/class_1262;method_29235(Lnet/minecraft/class_1799;Ljava/util/function/Predicate;IZ)I
        named remove Lnet/minecraft/inventory/Inventories;remove(Lnet/minecraft/item/ItemStack;Ljava/util/function/Predicate;IZ)I