mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 05:28:59 +00:00
Add/change recipes by plugin
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
package com.dre.brewery;
|
||||
|
||||
import com.dre.brewery.recipe.BCauldronRecipe;
|
||||
import com.dre.brewery.recipe.BRecipe;
|
||||
import com.dre.brewery.recipe.Ingredient;
|
||||
import com.dre.brewery.recipe.RecipeItem;
|
||||
import com.dre.brewery.recipe.SimpleItem;
|
||||
import com.dre.brewery.api.BreweryApi;
|
||||
import com.dre.brewery.recipe.*;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
@@ -66,4 +63,30 @@ public class RecipeTests {
|
||||
|
||||
RecipeItem.getMatchingRecipeItem(item, false);
|
||||
}
|
||||
|
||||
public static void testCustomRecipe() {
|
||||
BreweryApi.removeRecipe("Good Build");
|
||||
BRecipe recipe = BreweryApi.recipeBuilder("Bad Build", "Good Build", "Uber Build")
|
||||
.color(PotionColor.PINK)
|
||||
.addIngredient(new ItemStack(Material.FLOWER_POT))
|
||||
.alcohol(32)
|
||||
.cook(3)
|
||||
.difficulty(4)
|
||||
.age(3, (byte) 0)
|
||||
.get();
|
||||
BreweryApi.addRecipe(recipe, false);
|
||||
|
||||
P.p.log(BRecipe.getConfigRecipes().size() + "");
|
||||
|
||||
BreweryApi.removeRecipe("Bier");
|
||||
|
||||
P.p.log(BRecipe.getConfigRecipes().size() + "");
|
||||
|
||||
BCauldronRecipe r = BreweryApi.cauldronRecipeBuilder("Cooler Trank")
|
||||
.color(PotionColor.PINK)
|
||||
.addIngredient(new SimpleItem(Material.FLOWER_POT))
|
||||
.addLore("Schmeckt nAcH TOn?!")
|
||||
.get();
|
||||
BreweryApi.addCauldronRecipe(r, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user