Class InteractionResult
java.lang.Object
dev.sefiraat.networkslib.interfaces.interactable.InteractionResult
This class represents the result of an interaction request sent from Networks.
-
Constructor Summary
ConstructorsConstructorDescriptionInteractionResult(boolean interactionSuccessful, Location affectLocation, ItemStack... fetchedStacks) Creates a new InteractionResult -
Method Summary
Modifier and TypeMethodDescriptionReturns the location of the affected block and/or the location to drop unprocessed items.Returns theItemStack(s) produced as a result of this interaction.booleanReturns whether the interaction was successful or not.
-
Constructor Details
-
InteractionResult
@ParametersAreNonnullByDefault public InteractionResult(boolean interactionSuccessful, Location affectLocation, ItemStack... fetchedStacks) Creates a new InteractionResult- Parameters:
interactionSuccessful- Whether the interaction was successful or notaffectLocation- The location of the interaction. This is used for when Networks wants to reject a given item onto the ground.fetchedStacks- TheItemStack(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
Returns theItemStack(s) produced as a result of this interaction. Networks will attempt to process them and, if it fails, will drop into the world at thegetAffectLocation()- Returns:
- A list of
ItemStack(s) to process.
-
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.
-