Interface ItemInvSlotChangeListener.ItemInvSlotListener

All Superinterfaces:
ItemInvSlotChangeListener
Enclosing interface:
ItemInvSlotChangeListener
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ItemInvSlotChangeListener.ItemInvSlotListener extends ItemInvSlotChangeListener
A specialised type of listener that won't receive the previous ItemStack that occupied the given slot. Used for optimisation purposes in DirectFixedItemInv.
  • Method Details

    • onChange

      default void onChange(FixedItemInvView inv, int slot, net.minecraft.item.ItemStack previous, net.minecraft.item.ItemStack current)
      NOTE: This might not be called if the inventory calls onChange(FixedItemInvView, int) directly!
      Specified by:
      onChange in interface ItemInvSlotChangeListener
      Parameters:
      inv - The inventory that changed
      slot - The slot that changed
      previous - The previous ItemStack.
      current - The new ItemStack
    • onChange

      void onChange(FixedItemInvView inv, int slot)