Record Class ShapedRecipeWrapper
java.lang.Object
java.lang.Record
de.eldoria.jacksonbukkit.entities.ShapedRecipeWrapper
public record ShapedRecipeWrapper(NamespacedKey key, ItemStack result, List<String> shape, String group, Map<Character,RecipeChoiceWrapper<?>> ingredients)
extends Record 
Class for wrapping a 
ShapedRecipe.- 
Constructor SummaryConstructorsConstructorDescriptionShapedRecipeWrapper(NamespacedKey key, ItemStack result, List<String> shape, String group, Map<Character, RecipeChoiceWrapper<?>> ingredients) Creates an instance of aShapedRecipeWrapperrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theingredientsrecord component.key()Returns the value of thekeyrecord component.static ShapedRecipeWrapperof(ShapedRecipe recipe) Create a newShapedRecipeWrapperbased on aShapedRecipe.result()Returns the value of theresultrecord component.shape()Returns the value of theshaperecord component.Constructs a newShapedRecipebased on wrapper values.final StringtoString()Returns a string representation of this record class.
- 
Constructor Details- 
ShapedRecipeWrapperpublic ShapedRecipeWrapper(NamespacedKey key, ItemStack result, List<String> shape, String group, Map<Character, RecipeChoiceWrapper<?>> ingredients) Creates an instance of aShapedRecipeWrapperrecord class.- Parameters:
- key- the value for the- keyrecord component
- result- the value for the- resultrecord component
- shape- the value for the- shaperecord component
- group- the value for the- grouprecord component
- ingredients- the value for the- ingredientsrecord component
 
 
- 
- 
Method Details- 
ofCreate a newShapedRecipeWrapperbased on aShapedRecipe.- Parameters:
- recipe- recipe instance
- Returns:
- new ShapedRecipeWrapperinstance
 
- 
toBukkitShapedRecipeConstructs a newShapedRecipebased on wrapper values.- Returns:
- new ShapedRecipeinstance
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
keyReturns the value of thekeyrecord component.- Returns:
- the value of the keyrecord component
 
- 
resultReturns the value of theresultrecord component.- Returns:
- the value of the resultrecord component
 
- 
shapeReturns the value of theshaperecord component.- Returns:
- the value of the shaperecord component
 
- 
groupReturns the value of thegrouprecord component.- Returns:
- the value of the grouprecord component
 
- 
ingredientsReturns the value of theingredientsrecord component.- Returns:
- the value of the ingredientsrecord component
 
 
-