Interface IContainer


  • public interface IContainer
    • Method Detail

      • getSize

        int getSize()
      • setSlot

        void setSlot​(int slot,
                     IItemStack item)
        Parameters:
        slot - The slot to be replaced
        item - The item replacing the previous item in that slot, as an IItemStack object
      • getMCInventory

        net.minecraft.inventory.IInventory getMCInventory()
        Returns:
        An obfuscated MC inventory object.
      • getMCContainer

        net.minecraft.inventory.Container getMCContainer()
        Returns:
        An obfuscated MC container object.
      • count

        int count​(IItemStack itemStack,
                  boolean ignoreDamage,
                  boolean ignoreNBT)
        Parameters:
        itemStack - The item stack to be searched in the container
        ignoreDamage - Whether damage should be ignored when searching
        ignoreNBT - Whether NBT values should be ignored when searching
        Returns:
        The amount of the item stack found, based on the flags given above.
      • getItems

        IItemStack[] getItems()
        Returns:
        A list of all item stacks in the container as a list of IItemStack objects.
      • isCustomGUI

        boolean isCustomGUI()
        Returns:
        True if this container belongs to a Custom GUI.
      • detectAndSendChanges

        void detectAndSendChanges()
        Sends changes to be reflected on the player's client.
      • isPlayerNotUsingContainer

        boolean isPlayerNotUsingContainer​(IPlayer player)