Interface SidedSlot

  • All Superinterfaces:
    Inventory, Slot, ValueContainer

    public interface SidedSlot
    extends Slot
    A slot which belongs to a particular side of a "sided" inventory.
    • Method Detail

      • canAccept

        boolean canAccept​(ItemStack stack,
                          Direction from)
        Gets whether this slot can accept the specified item from the specified direction.
        Parameters:
        stack - Stack to check
        from - Direction to check for insertion from
        Returns:
        true if this inventory can accept the supplied stack from the specified direction
      • offer

        boolean offer​(ItemStack stack,
                      Direction from)
        Attempts to insert the supplied stack into this inventory from the specified direction.
        Parameters:
        stack - Stack to insert
        from - Direction to check for insertion from
        Returns:
        true if this inventory can accept the supplied stack from the specified direction
        See Also:
        Inventory.offer(ItemStack...)
      • canGet

        boolean canGet​(ItemStack stack,
                       Direction from)
        Gets whether automation can extract the specified item from the specified direction.
        Parameters:
        stack - Stack to check
        from - Direction to check for retrieval from
        Returns:
        true if automation can retrieve the supplied stack from the specified direction