Class ItemInteractionResult
java.lang.Object
io.github.thebusybiscuit.slimefun4.core.attributes.interactions.InteractionResult
io.github.thebusybiscuit.slimefun4.core.attributes.interactions.ItemInteractionResult
This class represents the result of an interaction on an
ExternallyInteractable
item.-
Constructor Summary
ConstructorDescriptionItemInteractionResult
(boolean successful) Creates a new InteractionResult.ItemInteractionResult
(boolean successful, ItemStack... itemStacks) Creates a new InteractionResult. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addResultItems
(ItemStack... itemStacks) Adds an or severalItemStack
's into the result.Returns theItemStack
(s) produced as a result of this interaction, if any.boolean
This returned whether items are included as part of the result.Methods inherited from class io.github.thebusybiscuit.slimefun4.core.attributes.interactions.InteractionResult
getResultMessage, hasResultMessage, isInteractionSuccessful, setResultMessage
-
Constructor Details
-
ItemInteractionResult
public ItemInteractionResult(boolean successful) Creates a new InteractionResult.- Parameters:
successful
- Whether the interaction was successful or not.
-
ItemInteractionResult
Creates a new InteractionResult.- Parameters:
successful
- Whether the interaction was successful or not.itemStacks
- TheItemStack
(s) that would be returned due to this interaction.
-
-
Method Details
-
addResultItems
Adds an or severalItemStack
's into the result.- Parameters:
itemStacks
- TheItemStack
(s) that would be returned due to this interaction.
-
resultedInItems
public boolean resultedInItems()This returned whether items are included as part of the result.- Returns:
- True if items are included in the result.
-
getResultItems
Returns theItemStack
(s) produced as a result of this interaction, if any.
-