Package alexiil.mc.lib.attributes.item
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
.-
Nested Class Summary
Nested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.ItemInvSlotChangeListener
ItemInvSlotChangeListener.ItemInvSlotListener
-
Method Summary
Modifier and Type Method Description void
onChange(FixedItemInvView inv, int slot)
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 callsonChange(FixedItemInvView, int)
directly!
-
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 callsonChange(FixedItemInvView, int)
directly!- Specified by:
onChange
in interfaceItemInvSlotChangeListener
- Parameters:
inv
- The inventory that changedslot
- The slot that changedprevious
- The previousItemStack
.current
- The newItemStack
-
onChange
-