Class SimpleInventory

java.lang.Object
net.minecraft.inventory.SimpleInventory
All Implemented Interfaces:
Inventory, Nameable
Direct Known Subclasses:
AnimalInventory, class_4550, class_4552, ClientNetworkSyncedInventory, EnderChestInventory

public class SimpleInventory extends Object implements Inventory
Mappings:
Namespace Name
official wa
intermediary net/minecraft/class_852
named net/minecraft/inventory/SimpleInventory
  • Field Details

    • name

      private String name
      Mappings:
      Namespace Name Mixin selector
      official a Lwa;a:Ljava/lang/String;
      intermediary field_3115 Lnet/minecraft/class_852;field_3115:Ljava/lang/String;
      named name Lnet/minecraft/inventory/SimpleInventory;name:Ljava/lang/String;
    • size

      private int size
      Mappings:
      Namespace Name Mixin selector
      official b Lwa;b:I
      intermediary field_3116 Lnet/minecraft/class_852;field_3116:I
      named size Lnet/minecraft/inventory/SimpleInventory;size:I
    • inventory

      private ItemStack[] inventory
      Mappings:
      Namespace Name Mixin selector
      official c Lwa;c:[Lamj;
      intermediary field_3117 Lnet/minecraft/class_852;field_3117:[Lnet/minecraft/class_1071;
      named inventory Lnet/minecraft/inventory/SimpleInventory;inventory:[Lnet/minecraft/item/ItemStack;
    • listeners

      private List listeners
      Mappings:
      Namespace Name Mixin selector
      official d Lwa;d:Ljava/util/List;
      intermediary field_3118 Lnet/minecraft/class_852;field_3118:Ljava/util/List;
      named listeners Lnet/minecraft/inventory/SimpleInventory;listeners:Ljava/util/List;
    • hasCustomName

      private boolean hasCustomName
      Mappings:
      Namespace Name Mixin selector
      official e Lwa;e:Z
      intermediary field_6098 Lnet/minecraft/class_852;field_6098:Z
      named hasCustomName Lnet/minecraft/inventory/SimpleInventory;hasCustomName:Z
  • Constructor Details

    • SimpleInventory

      public SimpleInventory(String name, boolean hasCustomName, int size)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lwa;<init>(Ljava/lang/String;ZI)V
      intermediary <init> Lnet/minecraft/class_852;<init>(Ljava/lang/String;ZI)V
      named <init> Lnet/minecraft/inventory/SimpleInventory;<init>(Ljava/lang/String;ZI)V
    • SimpleInventory

      @Environment(CLIENT) public SimpleInventory(Text text, int id)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lwa;<init>(Lho;I)V
      intermediary <init> Lnet/minecraft/class_852;<init>(Lnet/minecraft/class_1982;I)V
      named <init> Lnet/minecraft/inventory/SimpleInventory;<init>(Lnet/minecraft/text/Text;I)V
  • Method Details

    • addListener

      public void addListener(SimpleInventoryListener listener)
      Mappings:
      Namespace Name Mixin selector
      official a Lwa;a(Lvr;)V
      intermediary method_6072 Lnet/minecraft/class_852;method_6072(Lnet/minecraft/class_850;)V
      named addListener Lnet/minecraft/inventory/SimpleInventory;addListener(Lnet/minecraft/inventory/SimpleInventoryListener;)V
    • removeListener

      public void removeListener(SimpleInventoryListener listener)
      Mappings:
      Namespace Name Mixin selector
      official b Lwa;b(Lvr;)V
      intermediary method_6073 Lnet/minecraft/class_852;method_6073(Lnet/minecraft/class_850;)V
      named removeListener Lnet/minecraft/inventory/SimpleInventory;removeListener(Lnet/minecraft/inventory/SimpleInventoryListener;)V
    • getInvStack

      public ItemStack getInvStack(int slot)
      Specified by:
      getInvStack in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a Lvq;a(I)Lamj;
      intermediary method_2381 Lnet/minecraft/class_849;method_2381(I)Lnet/minecraft/class_1071;
      named getInvStack Lnet/minecraft/inventory/Inventory;getInvStack(I)Lnet/minecraft/item/ItemStack;
    • takeInvStack

      public ItemStack takeInvStack(int slot, int amount)
      Specified by:
      takeInvStack in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a Lvq;a(II)Lamj;
      intermediary method_2382 Lnet/minecraft/class_849;method_2382(II)Lnet/minecraft/class_1071;
      named takeInvStack Lnet/minecraft/inventory/Inventory;takeInvStack(II)Lnet/minecraft/item/ItemStack;
    • fillInventoryWith

      public ItemStack fillInventoryWith(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official a Lwa;a(Lamj;)Lamj;
      intermediary method_10914 Lnet/minecraft/class_852;method_10914(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1071;
      named fillInventoryWith Lnet/minecraft/inventory/SimpleInventory;fillInventoryWith(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;
    • removeInvStack

      public ItemStack removeInvStack(int slot)
      Specified by:
      removeInvStack in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official b Lvq;b(I)Lamj;
      intermediary method_2386 Lnet/minecraft/class_849;method_2386(I)Lnet/minecraft/class_1071;
      named removeInvStack Lnet/minecraft/inventory/Inventory;removeInvStack(I)Lnet/minecraft/item/ItemStack;
    • setInvStack

      public void setInvStack(int slot, ItemStack stack)
      Specified by:
      setInvStack in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a Lvq;a(ILamj;)V
      intermediary method_2383 Lnet/minecraft/class_849;method_2383(ILnet/minecraft/class_1071;)V
      named setInvStack Lnet/minecraft/inventory/Inventory;setInvStack(ILnet/minecraft/item/ItemStack;)V
    • getInvSize

      public int getInvSize()
      Specified by:
      getInvSize in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official n_ Lvq;n_()I
      intermediary method_2388 Lnet/minecraft/class_849;method_2388()I
      named getInvSize Lnet/minecraft/inventory/Inventory;getInvSize()I
    • getTranslationKey

      public String getTranslationKey()
      Specified by:
      getTranslationKey in interface Nameable
      Mappings:
      Namespace Name Mixin selector
      official d_ Lvz;d_()Ljava/lang/String;
      intermediary method_2518 Lnet/minecraft/class_2611;method_2518()Ljava/lang/String;
      named getTranslationKey Lnet/minecraft/text/Nameable;getTranslationKey()Ljava/lang/String;
    • hasCustomName

      public boolean hasCustomName()
      Specified by:
      hasCustomName in interface Nameable
      Mappings:
      Namespace Name Mixin selector
      official k_ Lvz;k_()Z
      intermediary method_5339 Lnet/minecraft/class_2611;method_5339()Z
      named hasCustomName Lnet/minecraft/text/Nameable;hasCustomName()Z
    • setName

      public void setName(String name)
      Mappings:
      Namespace Name Mixin selector
      official a Lwa;a(Ljava/lang/String;)V
      intermediary method_6071 Lnet/minecraft/class_852;method_6071(Ljava/lang/String;)V
      named setName Lnet/minecraft/inventory/SimpleInventory;setName(Ljava/lang/String;)V
    • method_6344

      public Text method_6344()
      Specified by:
      method_6344 in interface Nameable
      Mappings:
      Namespace Name Mixin selector
      official e_ Lvz;e_()Lho;
      intermediary method_6344 Lnet/minecraft/class_2611;method_6344()Lnet/minecraft/class_1982;
      named method_6344 Lnet/minecraft/text/Nameable;method_6344()Lnet/minecraft/text/Text;
    • getInvMaxStackAmount

      public int getInvMaxStackAmount()
      Specified by:
      getInvMaxStackAmount in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official p_ Lvq;p_()I
      intermediary method_2389 Lnet/minecraft/class_849;method_2389()I
      named getInvMaxStackAmount Lnet/minecraft/inventory/Inventory;getInvMaxStackAmount()I
    • markDirty

      public void markDirty()
      Specified by:
      markDirty in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official o_ Lvq;o_()V
      intermediary method_543 Lnet/minecraft/class_849;method_543()V
      named markDirty Lnet/minecraft/inventory/Inventory;markDirty()V
    • canPlayerUseInv

      public boolean canPlayerUseInv(PlayerEntity player)
      Specified by:
      canPlayerUseInv in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a Lvq;a(Lahd;)Z
      intermediary method_2384 Lnet/minecraft/class_849;method_2384(Lnet/minecraft/class_988;)Z
      named canPlayerUseInv Lnet/minecraft/inventory/Inventory;canPlayerUseInv(Lnet/minecraft/entity/player/PlayerEntity;)Z
    • onInvOpen

      public void onInvOpen(PlayerEntity player)
      Specified by:
      onInvOpen in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official b Lvq;b(Lahd;)V
      intermediary method_10894 Lnet/minecraft/class_849;method_10894(Lnet/minecraft/class_988;)V
      named onInvOpen Lnet/minecraft/inventory/Inventory;onInvOpen(Lnet/minecraft/entity/player/PlayerEntity;)V
    • onInvClose

      public void onInvClose(PlayerEntity player)
      Specified by:
      onInvClose in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official c Lvq;c(Lahd;)V
      intermediary method_10895 Lnet/minecraft/class_849;method_10895(Lnet/minecraft/class_988;)V
      named onInvClose Lnet/minecraft/inventory/Inventory;onInvClose(Lnet/minecraft/entity/player/PlayerEntity;)V
    • isValidInvStack

      public boolean isValidInvStack(int slot, ItemStack stack)
      Specified by:
      isValidInvStack in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official b Lvq;b(ILamj;)Z
      intermediary method_5338 Lnet/minecraft/class_849;method_5338(ILnet/minecraft/class_1071;)Z
      named isValidInvStack Lnet/minecraft/inventory/Inventory;isValidInvStack(ILnet/minecraft/item/ItemStack;)Z
    • getProperty

      public int getProperty(int key)
      Specified by:
      getProperty in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a_ Lvq;a_(I)I
      intermediary method_10892 Lnet/minecraft/class_849;method_10892(I)I
      named getProperty Lnet/minecraft/inventory/Inventory;getProperty(I)I
    • setProperty

      public void setProperty(int id, int value)
      Specified by:
      setProperty in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official b Lvq;b(II)V
      intermediary method_10893 Lnet/minecraft/class_849;method_10893(II)V
      named setProperty Lnet/minecraft/inventory/Inventory;setProperty(II)V
    • getProperties

      public int getProperties()
      Specified by:
      getProperties in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official g Lvq;g()I
      intermediary method_10896 Lnet/minecraft/class_849;method_10896()I
      named getProperties Lnet/minecraft/inventory/Inventory;getProperties()I
    • clear

      public void clear()
      Specified by:
      clear in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official l Lvq;l()V
      intermediary method_10897 Lnet/minecraft/class_849;method_10897()V
      named clear Lnet/minecraft/inventory/Inventory;clear()V