Package com.github.darksoulq.ner.util
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 Summary
ConstructorsConstructorDescriptionRecipeData(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 aRecipeDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStackcatalyst()Returns the value of thecatalystrecord component.category()Returns the value of thecategoryrecord component.final booleanIndicates whether some other object is "equal to" this one.List<org.bukkit.inventory.ItemStack> getInputsAt(int slot) List<org.bukkit.inventory.ItemStack> getOutputsAt(int slot) List<org.bukkit.inventory.ItemStack> org.bukkit.inventory.ItemStackfinal inthashCode()Returns a hash code value for this object.inputs()Returns the value of theinputsrecord component.booleanisCatalyst(Predicate<org.bukkit.inventory.ItemStack> filter) booleanisCatalyst(org.bukkit.Material material) booleanisCraftable(org.bukkit.entity.Player player) booleanisRecipeClass(Class<?> recipeClass) outputs()Returns the value of theoutputsrecord component.Returns the value of therawReciperecord component.final StringtoString()Returns a string representation of this record class.view()Returns the value of theviewrecord component.
-
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 aRecipeDatarecord class.- Parameters:
view- the value for theviewrecord componentrawRecipe- the value for therawReciperecord componentcategory- the value for thecategoryrecord componentcatalyst- the value for thecatalystrecord componentinputs- the value for theinputsrecord componentoutputs- the value for theoutputsrecord component
-
-
Method Details
-
isCatalyst
public boolean isCatalyst(org.bukkit.Material material) -
isCatalyst
-
isRecipeClass
-
getInputsAt
-
getOutputsAt
-
getPrimaryOutputs
-
getPrimaryResult
public org.bukkit.inventory.ItemStack getPrimaryResult() -
isCraftable
public boolean isCraftable(org.bukkit.entity.Player player) -
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
view
Returns the value of theviewrecord component.- Returns:
- the value of the
viewrecord component
-
rawRecipe
Returns the value of therawReciperecord component.- Returns:
- the value of the
rawReciperecord component
-
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
catalyst
public org.bukkit.inventory.ItemStack catalyst()Returns the value of thecatalystrecord component.- Returns:
- the value of the
catalystrecord component
-
inputs
Returns the value of theinputsrecord component.- Returns:
- the value of the
inputsrecord component
-
outputs
Returns the value of theoutputsrecord component.- Returns:
- the value of the
outputsrecord component
-