java.lang.Object
io.github.thebusybiscuit.slimefun4.core.attributes.interactions.InteractionResult
io.github.thebusybiscuit.slimefun4.core.attributes.interactions.ItemInteractionResult

public class ItemInteractionResult extends InteractionResult
This class represents the result of an interaction on an ExternallyInteractable item.
  • Constructor Details

    • ItemInteractionResult

      public ItemInteractionResult(boolean successful)
      Creates a new InteractionResult.
      Parameters:
      successful - Whether the interaction was successful or not.
    • ItemInteractionResult

      public ItemInteractionResult(boolean successful, ItemStack... itemStacks)
      Creates a new InteractionResult.
      Parameters:
      successful - Whether the interaction was successful or not.
      itemStacks - The ItemStack(s) that would be returned due to this interaction.
  • Method Details

    • addResultItems

      public void addResultItems(ItemStack... itemStacks)
      Adds an or several ItemStack's into the result.
      Parameters:
      itemStacks - The ItemStack(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

      @Nonnull public Set<ItemStack> getResultItems()
      Returns the ItemStack(s) produced as a result of this interaction, if any.
      Returns:
      An unmodifiable Set of ItemStack(s) created due to the interaction.