Record Class NerUtil.RecipeData

java.lang.Object
java.lang.Record
com.github.darksoulq.ner.util.NerUtil.RecipeData
Enclosing class:
NerUtil

public static record NerUtil.RecipeData(ParsedRecipeView view, Object rawRecipe, RecipeCategory<?> category, org.bukkit.inventory.ItemStack catalyst, Map<Integer,List<org.bukkit.inventory.ItemStack>> inputs, Map<Integer,List<org.bukkit.inventory.ItemStack>> outputs) extends Record
  • Constructor Details

    • RecipeData

      public RecipeData(ParsedRecipeView view, Object rawRecipe, RecipeCategory<?> category, org.bukkit.inventory.ItemStack catalyst, Map<Integer,List<org.bukkit.inventory.ItemStack>> inputs, Map<Integer,List<org.bukkit.inventory.ItemStack>> outputs)
      Creates an instance of a RecipeData record class.
      Parameters:
      view - the value for the view record component
      rawRecipe - the value for the rawRecipe record component
      category - the value for the category record component
      catalyst - the value for the catalyst record component
      inputs - the value for the inputs record component
      outputs - the value for the outputs record component
  • Method Details

    • isCatalyst

      public boolean isCatalyst(org.bukkit.Material material)
    • isCatalyst

      public boolean isCatalyst(Predicate<org.bukkit.inventory.ItemStack> filter)
    • isRecipeClass

      public boolean isRecipeClass(Class<?> recipeClass)
    • getInputsAt

      public List<org.bukkit.inventory.ItemStack> getInputsAt(int slot)
    • getOutputsAt

      public List<org.bukkit.inventory.ItemStack> getOutputsAt(int slot)
    • getPrimaryOutputs

      public List<org.bukkit.inventory.ItemStack> getPrimaryOutputs()
    • getPrimaryResult

      public org.bukkit.inventory.ItemStack getPrimaryResult()
    • isCraftable

      public boolean isCraftable(org.bukkit.entity.Player player)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • view

      public ParsedRecipeView view()
      Returns the value of the view record component.
      Returns:
      the value of the view record component
    • rawRecipe

      public Object rawRecipe()
      Returns the value of the rawRecipe record component.
      Returns:
      the value of the rawRecipe record component
    • category

      public RecipeCategory<?> category()
      Returns the value of the category record component.
      Returns:
      the value of the category record component
    • catalyst

      public org.bukkit.inventory.ItemStack catalyst()
      Returns the value of the catalyst record component.
      Returns:
      the value of the catalyst record component
    • inputs

      public Map<Integer,List<org.bukkit.inventory.ItemStack>> inputs()
      Returns the value of the inputs record component.
      Returns:
      the value of the inputs record component
    • outputs

      public Map<Integer,List<org.bukkit.inventory.ItemStack>> outputs()
      Returns the value of the outputs record component.
      Returns:
      the value of the outputs record component