Add/change recipes by plugin

This commit is contained in:
Sn0wStorm
2019-11-09 17:02:48 +01:00
parent 81ea014e45
commit 318963b379
12 changed files with 697 additions and 41 deletions
+28 -5
View File
@@ -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);
}
}