All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.jorel.commandapi.wrappers.ComplexRecipeImpl Maven / Gradle / Ivy

There is a newer version: 9.5.3
Show newest version
package dev.jorel.commandapi.wrappers;

import org.bukkit.NamespacedKey;
import org.bukkit.inventory.ComplexRecipe;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
import org.jetbrains.annotations.NotNull;

/**
 * Creates a ComplexRecipe based on a NamespacedKey and a Recipe object.
 * @param key the namespaced key
 * @param recipe the recipe
 */
public record ComplexRecipeImpl(NamespacedKey key, Recipe recipe) implements ComplexRecipe {

	/**
     * Get the result of this recipe.
     *
     * @return The result stack
     */
	@Override
	public @NotNull ItemStack getResult() {
		return recipe.getResult();
	}

	/**
     * Return the namespaced identifier for this object.
     *
     * @return this object's key
     */
	@Override
	public @NotNull NamespacedKey getKey() {
		return key;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy