Class InteractionResult

java.lang.Object
dev.sefiraat.networkslib.interfaces.interactable.InteractionResult

public class InteractionResult extends Object
This class represents the result of an interaction request sent from Networks.
  • Constructor Details

    • InteractionResult

      @ParametersAreNonnullByDefault public InteractionResult(boolean interactionSuccessful, Location affectLocation, ItemStack... fetchedStacks)
      Creates a new InteractionResult
      Parameters:
      interactionSuccessful - Whether the interaction was successful or not
      affectLocation - The location of the interaction. This is used for when Networks wants to reject a given item onto the ground.
      fetchedStacks - The ItemStack(s) that Networks will attempt to process. Any items that cannot go into the Network will be dropped at the affectLocation.
  • Method Details

    • isInteractionSuccessful

      public boolean isInteractionSuccessful()
      Returns whether the interaction was successful or not.
      Returns:
      boolean denoting success.
    • getFetchedStacks

      @Nonnull public List<ItemStack> getFetchedStacks()
      Returns the ItemStack(s) produced as a result of this interaction. Networks will attempt to process them and, if it fails, will drop into the world at the getAffectLocation()
      Returns:
      A list of ItemStack(s) to process.
    • getAffectLocation

      @Nonnull public Location getAffectLocation()
      Returns the location of the affected block and/or the location to drop unprocessed items.
      Returns:
      the location of the affected block and/or the location to drop unprocessed items.