Skip to content

Commit a54f128

Browse files
committed
Renamed IPotionRecipe.getInput() to getIngredient()
1 parent c078ec5 commit a54f128

4 files changed

Lines changed: 26 additions & 11 deletions

File tree

src/main/java/clashsoft/brewingapi/potion/recipe/AbstractPotionRecipe.java

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
public abstract class AbstractPotionRecipe implements IPotionRecipe
99
{
10-
protected ItemStack input;
10+
protected ItemStack ingredient;
1111

1212
public AbstractPotionRecipe(ItemStack input)
1313
{
14-
this.input = input;
14+
this.ingredient = input;
1515
}
1616

1717
@Override
@@ -22,17 +22,25 @@ public IPotionRecipe register()
2222
}
2323

2424
@Override
25-
public ItemStack getInput()
25+
public ItemStack getIngredient()
2626
{
27-
return this.input;
27+
return this.ingredient;
2828
}
2929

3030
@Override
3131
public boolean canApply(ItemStack ingredient, PotionTypeList potionTypes)
3232
{
33-
return CSStacks.itemEquals(this.getInput(), ingredient) && this.canApply(potionTypes);
33+
return CSStacks.itemEquals(this.getIngredient(), ingredient) && this.canApply(potionTypes);
3434
}
3535

36+
/**
37+
* Returns true if this {@link IPotionRecipe} is appliable to the given
38+
* {@link ItemStack} {@code potion}.
39+
*
40+
* @param potion
41+
* the potion stack
42+
* @return true, if this potion recipe is appliable
43+
*/
3644
public abstract boolean canApply(PotionTypeList potionTypes);
3745

3846
@Override
@@ -41,5 +49,12 @@ public void apply(ItemStack ingredient, PotionTypeList potionTypes)
4149
this.apply(potionTypes);
4250
}
4351

52+
/**
53+
* Applies this {@link IPotionRecipe} to the given {@link ItemStack}
54+
* {@code potion}.
55+
*
56+
* @param potion
57+
* the potion stack
58+
*/
4459
public abstract void apply(PotionTypeList potionTypes);
4560
}

src/main/java/clashsoft/brewingapi/potion/recipe/IPotionRecipe.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ public interface IPotionRecipe
1717
public IPotionRecipe register();
1818

1919
/**
20-
* Gets the input stack of this {@link IPotionRecipe}.
20+
* Gets the ingredient of this {@link IPotionRecipe}.
2121
*
22-
* @return the input stack
22+
* @return the ingredient
2323
*/
24-
public ItemStack getInput();
24+
public ItemStack getIngredient();
2525

2626
/**
2727
* Returns true if this {@link IPotionRecipe} is appliable to the given

src/main/java/clashsoft/brewingapi/potion/recipe/PotionRecipes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static IPotionRecipe get(ItemStack ingredient)
4141
{
4242
for (IPotionRecipe recipe : recipes)
4343
{
44-
if (CSStacks.equals(ingredient, recipe.getInput()))
44+
if (CSStacks.equals(ingredient, recipe.getIngredient()))
4545
{
4646
return recipe;
4747
}
@@ -62,7 +62,7 @@ public static List<IPotionRecipe> getAll(ItemStack ingredient)
6262
List<IPotionRecipe> list = new ArrayList();
6363
for (IPotionRecipe recipe : recipes)
6464
{
65-
if (CSStacks.equals(ingredient, recipe.getInput()))
65+
if (CSStacks.equals(ingredient, recipe.getIngredient()))
6666
{
6767
list.add(recipe);
6868
}

src/main/java/clashsoft/brewingapi/potion/type/AbstractPotionType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public StringBuilder getDisplayName()
168168
public ItemStack getIngredient()
169169
{
170170
PotionRecipe recipe = PotionRecipes.get(this);
171-
return recipe == null ? null : recipe.getInput();
171+
return recipe == null ? null : recipe.getIngredient();
172172
}
173173

174174
@Override

0 commit comments

Comments
 (0)