Class SimpleInventory

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

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

    • name

      private String name
      Mappings:
      Namespace Name Mixin selector
      official a Loq;a:Ljava/lang/String;
      intermediary field_7216 Lnet/minecraft/class_1727;field_7216:Ljava/lang/String;
      named name Lnet/minecraft/inventory/SimpleInventory;name:Ljava/lang/String;
    • size

      private int size
      Mappings:
      Namespace Name Mixin selector
      official b Loq;b:I
      intermediary field_7217 Lnet/minecraft/class_1727;field_7217:I
      named size Lnet/minecraft/inventory/SimpleInventory;size:I
    • inventory

      private ItemStack[] inventory
      Mappings:
      Namespace Name Mixin selector
      official c Loq;c:[Lzx;
      intermediary field_7218 Lnet/minecraft/class_1727;field_7218:[Lnet/minecraft/class_2056;
      named inventory Lnet/minecraft/inventory/SimpleInventory;inventory:[Lnet/minecraft/item/ItemStack;
    • listeners

      private List<SimpleInventoryListener> listeners
      Mappings:
      Namespace Name Mixin selector
      official d Loq;d:Ljava/util/List;
      intermediary field_7219 Lnet/minecraft/class_1727;field_7219:Ljava/util/List;
      named listeners Lnet/minecraft/inventory/SimpleInventory;listeners:Ljava/util/List;
    • hasCustomName

      private boolean hasCustomName
      Mappings:
      Namespace Name Mixin selector
      official e Loq;e:Z
      intermediary field_7220 Lnet/minecraft/class_1727;field_7220: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> Loq;<init>(Ljava/lang/String;ZI)V
      intermediary <init> Lnet/minecraft/class_1727;<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> Loq;<init>(Leu;I)V
      intermediary <init> Lnet/minecraft/class_1727;<init>(Lnet/minecraft/class_1444;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 Loq;a(Loh;)V
      intermediary method_6772 Lnet/minecraft/class_1727;method_6772(Lnet/minecraft/class_1719;)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 Loq;b(Loh;)V
      intermediary method_6774 Lnet/minecraft/class_1727;method_6774(Lnet/minecraft/class_1719;)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 Log;a(I)Lzx;
      intermediary method_6736 Lnet/minecraft/class_1718;method_6736(I)Lnet/minecraft/class_2056;
      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 Log;a(II)Lzx;
      intermediary method_6737 Lnet/minecraft/class_1718;method_6737(II)Lnet/minecraft/class_2056;
      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 Loq;a(Lzx;)Lzx;
      intermediary method_6773 Lnet/minecraft/class_1727;method_6773(Lnet/minecraft/class_2056;)Lnet/minecraft/class_2056;
      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 Log;b(I)Lzx;
      intermediary method_6741 Lnet/minecraft/class_1718;method_6741(I)Lnet/minecraft/class_2056;
      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 Log;a(ILzx;)V
      intermediary method_6738 Lnet/minecraft/class_1718;method_6738(ILnet/minecraft/class_2056;)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 o_ Log;o_()I
      intermediary method_6748 Lnet/minecraft/class_1718;method_6748()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 e_ Lop;e_()Ljava/lang/String;
      intermediary method_6261 Lnet/minecraft/class_1726;method_6261()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 l_ Lop;l_()Z
      intermediary method_6770 Lnet/minecraft/class_1726;method_6770()Z
      named hasCustomName Lnet/minecraft/text/Nameable;hasCustomName()Z
    • setName

      public void setName​(String name)
      Mappings:
      Namespace Name Mixin selector
      official a Loq;a(Ljava/lang/String;)V
      intermediary method_6771 Lnet/minecraft/class_1727;method_6771(Ljava/lang/String;)V
      named setName Lnet/minecraft/inventory/SimpleInventory;setName(Ljava/lang/String;)V
    • getName

      public Text getName()
      Specified by:
      getName in interface Nameable
      Mappings:
      Namespace Name Mixin selector
      official f_ Lop;f_()Leu;
      intermediary method_133 Lnet/minecraft/class_1726;method_133()Lnet/minecraft/class_1444;
      named getName Lnet/minecraft/text/Nameable;getName()Lnet/minecraft/text/Text;
    • getInvMaxStackAmount

      public int getInvMaxStackAmount()
      Specified by:
      getInvMaxStackAmount in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official q_ Log;q_()I
      intermediary method_6749 Lnet/minecraft/class_1718;method_6749()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 p_ Log;p_()V
      intermediary method_1103 Lnet/minecraft/class_1718;method_1103()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 Log;a(Lwn;)Z
      intermediary method_6739 Lnet/minecraft/class_1718;method_6739(Lnet/minecraft/class_1963;)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 Log;b(Lwn;)V
      intermediary method_6744 Lnet/minecraft/class_1718;method_6744(Lnet/minecraft/class_1963;)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 Log;c(Lwn;)V
      intermediary method_6745 Lnet/minecraft/class_1718;method_6745(Lnet/minecraft/class_1963;)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 Log;b(ILzx;)Z
      intermediary method_6743 Lnet/minecraft/class_1718;method_6743(ILnet/minecraft/class_2056;)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_ Log;a_(I)I
      intermediary method_6740 Lnet/minecraft/class_1718;method_6740(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 Log;b(II)V
      intermediary method_6742 Lnet/minecraft/class_1718;method_6742(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 Log;g()I
      intermediary method_6746 Lnet/minecraft/class_1718;method_6746()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 Log;l()V
      intermediary method_6747 Lnet/minecraft/class_1718;method_6747()V
      named clear Lnet/minecraft/inventory/Inventory;clear()V