Class ItemSwapAmountImpl

java.lang.Object
com.hammy275.immersivemc.server.api_impl.ItemSwapAmountImpl
All Implemented Interfaces:
ItemSwapAmount

public class ItemSwapAmountImpl extends Object implements ItemSwapAmount
  • Constructor Details

    • ItemSwapAmountImpl

      public ItemSwapAmountImpl(SwapMode swapMode, int numPlacements, int handStackSize, int slotIndex)
  • Method Details

    • getNumItemsToSwap

      public int getNumItemsToSwap()
      Description copied from interface: ItemSwapAmount
      Get the number of items to swap based on the input item stack size.
      Specified by:
      getNumItemsToSwap in interface ItemSwapAmount
      Returns:
      The amount of the stack to ideally swap.
    • getSwapMode

      public SwapMode getSwapMode()
      Description copied from interface: ItemSwapAmount
      Gets the underlying mode used for the swap. Useful for performing custom behavior instead of using a swapItems() call in ImmersiveLogicHelpers.
      Specified by:
      getSwapMode in interface ItemSwapAmount
      Returns:
      The swap mode currently in use.