类 SimpleInventory

    • 字段详细资料

      • size

        private final int size
        Mappings:
        Namespace Name Mixin selector
        official b Larl;b:I
        intermediary field_5831 Lnet/minecraft/class_1277;field_5831:I
        named size Lnet/minecraft/inventory/SimpleInventory;size:I
      • stacks

        private final DefaultedList<ItemStack> stacks
        Mappings:
        Namespace Name Mixin selector
        official c Larl;c:Lgn;
        intermediary field_5828 Lnet/minecraft/class_1277;field_5828:Lnet/minecraft/class_2371;
        named stacks Lnet/minecraft/inventory/SimpleInventory;stacks:Lnet/minecraft/util/collection/DefaultedList;
      • listeners

        private List<InventoryChangedListener> listeners
        Mappings:
        Namespace Name Mixin selector
        official d Larl;d:Ljava/util/List;
        intermediary field_5829 Lnet/minecraft/class_1277;field_5829:Ljava/util/List;
        named listeners Lnet/minecraft/inventory/SimpleInventory;listeners:Ljava/util/List;
    • 构造器详细资料

      • SimpleInventory

        public SimpleInventory​(int size)
        Mappings:
        Namespace Name Mixin selector
        official <init> Larl;<init>(I)V
        intermediary <init> Lnet/minecraft/class_1277;<init>(I)V
        named <init> Lnet/minecraft/inventory/SimpleInventory;<init>(I)V
      • SimpleInventory

        public SimpleInventory​(ItemStack[] items)
        Mappings:
        Namespace Name Mixin selector
        official <init> Larl;<init>([Lbpr;)V
        intermediary <init> Lnet/minecraft/class_1277;<init>([Lnet/minecraft/class_1799;)V
        named <init> Lnet/minecraft/inventory/SimpleInventory;<init>([Lnet/minecraft/item/ItemStack;)V
    • 方法详细资料

      • addListener

        public void addListener​(InventoryChangedListener listener)
        Mappings:
        Namespace Name Mixin selector
        official a Larl;a(Larb;)V
        intermediary method_5489 Lnet/minecraft/class_1277;method_5489(Lnet/minecraft/class_1265;)V
        named addListener Lnet/minecraft/inventory/SimpleInventory;addListener(Lnet/minecraft/inventory/InventoryChangedListener;)V
      • removeListener

        public void removeListener​(InventoryChangedListener listener)
        Mappings:
        Namespace Name Mixin selector
        official b Larl;b(Larb;)V
        intermediary method_5488 Lnet/minecraft/class_1277;method_5488(Lnet/minecraft/class_1265;)V
        named removeListener Lnet/minecraft/inventory/SimpleInventory;removeListener(Lnet/minecraft/inventory/InventoryChangedListener;)V
      • getStack

        public ItemStack getStack​(int slot)
        Fetches the stack currently stored at the given slot. If the slot is empty, or is outside the bounds of this inventory, returns see ItemStack.EMPTY.
        指定者:
        getStack 在接口中 Inventory
        Mappings:
        Namespace Name Mixin selector
        official a Laqz;a(I)Lbpr;
        intermediary method_5438 Lnet/minecraft/class_1263;method_5438(I)Lnet/minecraft/class_1799;
        named getStack Lnet/minecraft/inventory/Inventory;getStack(I)Lnet/minecraft/item/ItemStack;
      • clearToList

        public List<ItemStack> clearToList()
        Clears this inventory and return all the non-empty stacks in a list.
        Mappings:
        Namespace Name Mixin selector
        official f Larl;f()Ljava/util/List;
        intermediary method_24514 Lnet/minecraft/class_1277;method_24514()Ljava/util/List;
        named clearToList Lnet/minecraft/inventory/SimpleInventory;clearToList()Ljava/util/List;
      • removeStack

        public ItemStack removeStack​(int slot,
                                     int amount)
        Removes a specific number of items from the given slot.
        指定者:
        removeStack 在接口中 Inventory
        返回:
        the removed items as a stack
        Mappings:
        Namespace Name Mixin selector
        official a Laqz;a(II)Lbpr;
        intermediary method_5434 Lnet/minecraft/class_1263;method_5434(II)Lnet/minecraft/class_1799;
        named removeStack Lnet/minecraft/inventory/Inventory;removeStack(II)Lnet/minecraft/item/ItemStack;
      • removeItem

        public ItemStack removeItem​(Item item,
                                    int count)
        Searches this inventory for the specified item and removes the given amount from this inventory.
        返回:
        the stack of removed items
        Mappings:
        Namespace Name Mixin selector
        official a Larl;a(Lbpn;I)Lbpr;
        intermediary method_20631 Lnet/minecraft/class_1277;method_20631(Lnet/minecraft/class_1792;I)Lnet/minecraft/class_1799;
        named removeItem Lnet/minecraft/inventory/SimpleInventory;removeItem(Lnet/minecraft/item/Item;I)Lnet/minecraft/item/ItemStack;
      • addStack

        public ItemStack addStack​(ItemStack stack)
        Mappings:
        Namespace Name Mixin selector
        official a Larl;a(Lbpr;)Lbpr;
        intermediary method_5491 Lnet/minecraft/class_1277;method_5491(Lnet/minecraft/class_1799;)Lnet/minecraft/class_1799;
        named addStack Lnet/minecraft/inventory/SimpleInventory;addStack(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;
      • canInsert

        public boolean canInsert​(ItemStack stack)
        Mappings:
        Namespace Name Mixin selector
        official b Larl;b(Lbpr;)Z
        intermediary method_27070 Lnet/minecraft/class_1277;method_27070(Lnet/minecraft/class_1799;)Z
        named canInsert Lnet/minecraft/inventory/SimpleInventory;canInsert(Lnet/minecraft/item/ItemStack;)Z
      • removeStack

        public ItemStack removeStack​(int slot)
        Removes the stack currently stored at the indicated slot.
        指定者:
        removeStack 在接口中 Inventory
        返回:
        the stack previously stored at the indicated slot.
        Mappings:
        Namespace Name Mixin selector
        official b Laqz;b(I)Lbpr;
        intermediary method_5441 Lnet/minecraft/class_1263;method_5441(I)Lnet/minecraft/class_1799;
        named removeStack Lnet/minecraft/inventory/Inventory;removeStack(I)Lnet/minecraft/item/ItemStack;
      • setStack

        public void setStack​(int slot,
                             ItemStack stack)
        指定者:
        setStack 在接口中 Inventory
        Mappings:
        Namespace Name Mixin selector
        official a Laqz;a(ILbpr;)V
        intermediary method_5447 Lnet/minecraft/class_1263;method_5447(ILnet/minecraft/class_1799;)V
        named setStack Lnet/minecraft/inventory/Inventory;setStack(ILnet/minecraft/item/ItemStack;)V
      • size

        public int size()
        指定者:
        size 在接口中 Inventory
        Mappings:
        Namespace Name Mixin selector
        official ab_ Laqz;ab_()I
        intermediary method_5439 Lnet/minecraft/class_1263;method_5439()I
        named size Lnet/minecraft/inventory/Inventory;size()I
      • isEmpty

        public boolean isEmpty()
        指定者:
        isEmpty 在接口中 Inventory
        Mappings:
        Namespace Name Mixin selector
        official c Laqz;c()Z
        intermediary method_5442 Lnet/minecraft/class_1263;method_5442()Z
        named isEmpty Lnet/minecraft/inventory/Inventory;isEmpty()Z
      • markDirty

        public void markDirty()
        指定者:
        markDirty 在接口中 Inventory
        Mappings:
        Namespace Name Mixin selector
        official Z_ Laqz;Z_()V
        intermediary method_5431 Lnet/minecraft/class_1263;method_5431()V
        named markDirty Lnet/minecraft/inventory/Inventory;markDirty()V
      • canPlayerUse

        public boolean canPlayerUse​(PlayerEntity player)
        指定者:
        canPlayerUse 在接口中 Inventory
        Mappings:
        Namespace Name Mixin selector
        official a Laqz;a(Lbjf;)Z
        intermediary method_5443 Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Z
        named canPlayerUse Lnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
      • clear

        public void clear()
        指定者:
        clear 在接口中 Clearable
        Mappings:
        Namespace Name Mixin selector
        official aa_ Laqx;aa_()V
        intermediary method_5448 Lnet/minecraft/class_3829;method_5448()V
        named clear Lnet/minecraft/util/Clearable;clear()V
      • provideRecipeInputs

        public void provideRecipeInputs​(RecipeFinder finder)
        指定者:
        provideRecipeInputs 在接口中 RecipeInputProvider
        Mappings:
        Namespace Name Mixin selector
        official a Lbnf;a(Lbjh;)V
        intermediary method_7683 Lnet/minecraft/class_1737;method_7683(Lnet/minecraft/class_1662;)V
        named provideRecipeInputs Lnet/minecraft/recipe/RecipeInputProvider;provideRecipeInputs(Lnet/minecraft/recipe/RecipeFinder;)V
      • toString

        public String toString()
        覆盖:
        toString 在类中 Object
        Mappings:
        Namespace Name Mixin selector
        official toString Larl;toString()Ljava/lang/String;
        intermediary toString Lnet/minecraft/class_1277;toString()Ljava/lang/String;
        named toString Lnet/minecraft/inventory/SimpleInventory;toString()Ljava/lang/String;
      • addToNewSlot

        private void addToNewSlot​(ItemStack stack)
        Mappings:
        Namespace Name Mixin selector
        official c Larl;c(Lbpr;)V
        intermediary method_20633 Lnet/minecraft/class_1277;method_20633(Lnet/minecraft/class_1799;)V
        named addToNewSlot Lnet/minecraft/inventory/SimpleInventory;addToNewSlot(Lnet/minecraft/item/ItemStack;)V
      • addToExistingSlot

        private void addToExistingSlot​(ItemStack stack)
        Mappings:
        Namespace Name Mixin selector
        official d Larl;d(Lbpr;)V
        intermediary method_20634 Lnet/minecraft/class_1277;method_20634(Lnet/minecraft/class_1799;)V
        named addToExistingSlot Lnet/minecraft/inventory/SimpleInventory;addToExistingSlot(Lnet/minecraft/item/ItemStack;)V
      • transfer

        private void transfer​(ItemStack source,
                              ItemStack target)
        Mappings:
        Namespace Name Mixin selector
        official a Larl;a(Lbpr;Lbpr;)V
        intermediary method_20632 Lnet/minecraft/class_1277;method_20632(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)V
        named transfer Lnet/minecraft/inventory/SimpleInventory;transfer(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)V
      • readNbtList

        public void readNbtList​(ListTag nbtList)
        Mappings:
        Namespace Name Mixin selector
        official a Larl;a(Lnb;)V
        intermediary method_7659 Lnet/minecraft/class_1277;method_7659(Lnet/minecraft/class_2499;)V
        named readNbtList Lnet/minecraft/inventory/SimpleInventory;readNbtList(Lnet/minecraft/nbt/ListTag;)V
      • toNbtList

        public ListTag toNbtList()
        Mappings:
        Namespace Name Mixin selector
        official g Larl;g()Lnb;
        intermediary method_7660 Lnet/minecraft/class_1277;method_7660()Lnet/minecraft/class_2499;
        named toNbtList Lnet/minecraft/inventory/SimpleInventory;toNbtList()Lnet/minecraft/nbt/ListTag;