Skip to content

Commit 7bea83e

Browse files
committed
Added CustomPotionRecipe
1 parent 7c2d951 commit 7bea83e

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package clashsoft.brewingapi.potion.recipe;
2+
3+
import clashsoft.brewingapi.potion.PotionTypeList;
4+
import clashsoft.cslib.minecraft.stack.CSStacks;
5+
6+
import net.minecraft.item.ItemStack;
7+
8+
public class CustomPotionRecipe extends AbstractPotionRecipe
9+
{
10+
public ItemStack input;
11+
public ItemStack output;
12+
13+
public CustomPotionRecipe(ItemStack input, ItemStack ingredient, ItemStack output)
14+
{
15+
super(ingredient);
16+
this.input = input;
17+
this.output = output;
18+
}
19+
20+
@Override
21+
public boolean canApply(PotionTypeList potionTypes)
22+
{
23+
return CSStacks.equals(potionTypes.getPotion(), this.input);
24+
}
25+
26+
@Override
27+
public void apply(PotionTypeList potionTypes)
28+
{
29+
potionTypes.setStack(this.output.copy());
30+
}
31+
}

0 commit comments

Comments
 (0)