mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-22 13:19:48 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
0cc3fa06c2
commit
655636b7e9
231 files changed
+10024
-8585
No files matched your search
@@ -21,17 +21,18 @@ import vazkii.botania.api.recipe.RecipeElvenTrade;
|
||||
|
||||
@ZenClass("mods.botania.ElvenTrade")
|
||||
public class ElvenTrade {
|
||||
|
||||
|
||||
protected static final String name = "Botania Eleven Trade";
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output, IIngredient[] input) {
|
||||
MineTweakerAPI.apply(new Add(new RecipeElvenTrade(toStack(output), toObjects(input))));
|
||||
}
|
||||
|
||||
private static class Add extends BaseListAddition<RecipeElvenTrade> {
|
||||
|
||||
public Add(RecipeElvenTrade recipe) {
|
||||
super(ElvenTrade.name, BotaniaAPI.elvenTradeRecipes);
|
||||
recipes.add(recipe);
|
||||
@@ -49,22 +50,24 @@ public class ElvenTrade {
|
||||
public static void removeRecipe(IIngredient output) {
|
||||
// Get list of existing recipes, matching with parameter
|
||||
LinkedList<RecipeElvenTrade> recipes = new LinkedList<RecipeElvenTrade>();
|
||||
|
||||
for(RecipeElvenTrade entry : BotaniaAPI.elvenTradeRecipes) {
|
||||
if(entry != null && entry.getOutput() != null && matches(output, toIItemStack(entry.getOutput()))) {
|
||||
|
||||
for (RecipeElvenTrade entry : BotaniaAPI.elvenTradeRecipes) {
|
||||
if (entry != null && entry.getOutput() != null && matches(output, toIItemStack(entry.getOutput()))) {
|
||||
recipes.add(entry);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Check if we found the recipes and apply the action
|
||||
if(!recipes.isEmpty()) {
|
||||
if (!recipes.isEmpty()) {
|
||||
MineTweakerAPI.apply(new Remove(recipes));
|
||||
} else {
|
||||
LogHelper.logWarning(String.format("No %s Recipe found for %s. Command ignored!", ElvenTrade.name, output.toString()));
|
||||
LogHelper.logWarning(
|
||||
String.format("No %s Recipe found for %s. Command ignored!", ElvenTrade.name, output.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
private static class Remove extends BaseListRemoval<RecipeElvenTrade> {
|
||||
|
||||
public Remove(List<RecipeElvenTrade> recipes) {
|
||||
super(ElvenTrade.name, BotaniaAPI.elvenTradeRecipes, recipes);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user