Package dev.jorel.commandapi.wrappers
Record Class ComplexRecipeImpl
java.lang.Object
java.lang.Record
dev.jorel.commandapi.wrappers.ComplexRecipeImpl
- Record Components:
key- the namespaced keyrecipe- the recipe
- All Implemented Interfaces:
net.kyori.adventure.key.Keyed,org.bukkit.inventory.ComplexRecipe,org.bukkit.inventory.Recipe,org.bukkit.Keyed
public record ComplexRecipeImpl(org.bukkit.NamespacedKey key, org.bukkit.inventory.Recipe recipe)
extends Record
implements org.bukkit.inventory.ComplexRecipe
Creates a ComplexRecipe based on a NamespacedKey and a Recipe object.
-
Constructor Summary
ConstructorsConstructorDescriptionComplexRecipeImpl(org.bukkit.NamespacedKey key, org.bukkit.inventory.Recipe recipe) Creates an instance of aComplexRecipeImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull org.bukkit.NamespacedKeygetKey()Return the namespaced identifier for this object.@NotNull org.bukkit.inventory.ItemStackGet the result of this recipe.final inthashCode()Returns a hash code value for this object.org.bukkit.NamespacedKeykey()Returns the value of thekeyrecord component.org.bukkit.inventory.Reciperecipe()Returns the value of thereciperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ComplexRecipeImpl
-
-
Method Details
-
getResult
@NotNull public @NotNull org.bukkit.inventory.ItemStack getResult()Get the result of this recipe.- Specified by:
getResultin interfaceorg.bukkit.inventory.Recipe- Returns:
- The result stack
-
getKey
@NotNull public @NotNull org.bukkit.NamespacedKey getKey()Return the namespaced identifier for this object.- Specified by:
getKeyin interfaceorg.bukkit.Keyed- Returns:
- this object's key
-
toString
-
hashCode
-
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). -
key
-
recipe
-