import java.util.List;
import java.util.UUID;
import org.bukkit.NamespacedKey;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
import org.ourcraft.daskrr.smp.SMP;
import com.google.common.collect.Lists;
public class CustomRecipe
{
protected Recipe recipe;
protected ItemStack result;
protected List<ItemStack> ingredients = Lists.newArrayList();
public CustomRecipe (Recipe recipe)
{
this.result = recipe.getResult();
this.recipe = recipe;
}
public CustomRecipe (ItemStack result)
{
this.result = result;
}
public Recipe getBukkitRecipe()
{
return recipe;
}
public ItemStack getResult()
{
return this.result;
}
public List<ItemStack> getIngredients()
{
return this.ingredients;
}
protected static NamespacedKey key ()
{
NamespacedKey nmspkey = new NamespacedKey(SMP.PLUGIN, "custom_recipe_" + UUID.randomUUID().toString());
// RecipeRegistry.RECIPES.add(nmspkey);
return nmspkey;
}
}
import java.util.UUID;
import org.bukkit.NamespacedKey;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
import org.ourcraft.daskrr.smp.SMP;
import com.google.common.collect.Lists;
public class CustomRecipe
{
protected Recipe recipe;
protected ItemStack result;
protected List<ItemStack> ingredients = Lists.newArrayList();
public CustomRecipe (Recipe recipe)
{
this.result = recipe.getResult();
this.recipe = recipe;
}
public CustomRecipe (ItemStack result)
{
this.result = result;
}
public Recipe getBukkitRecipe()
{
return recipe;
}
public ItemStack getResult()
{
return this.result;
}
public List<ItemStack> getIngredients()
{
return this.ingredients;
}
protected static NamespacedKey key ()
{
NamespacedKey nmspkey = new NamespacedKey(SMP.PLUGIN, "custom_recipe_" + UUID.randomUUID().toString());
// RecipeRegistry.RECIPES.add(nmspkey);
return nmspkey;
}
}