ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CoffeeIngredient.java

49 lines
1.3 KiB
Java
Raw Normal View History

2016-05-14 13:51:18 +02:00
package de.ellpeck.actuallyadditions.api.recipe;
2016-01-05 04:47:35 +01:00
2016-05-14 13:51:18 +02:00
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
2016-01-05 04:47:35 +01:00
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.potion.EffectInstance;
2016-01-05 04:47:35 +01:00
2020-09-25 09:02:16 +02:00
@Deprecated
public class CoffeeIngredient {
2016-01-05 04:47:35 +01:00
protected final Ingredient input;
protected final int maxAmplifier;
protected EffectInstance[] effects;
2016-01-05 04:47:35 +01:00
@Deprecated
public CoffeeIngredient(ItemStack input, EffectInstance[] effects, int maxAmplifier) {
this(Ingredient.fromStacks(input), maxAmplifier, effects);
}
2019-02-27 19:53:05 +01:00
public CoffeeIngredient(Ingredient input, int maxAmplifier, EffectInstance... effects) {
this.input = input;
2016-01-05 04:47:35 +01:00
this.effects = effects;
this.maxAmplifier = maxAmplifier;
}
2019-02-27 19:53:05 +01:00
public boolean matches(ItemStack stack) {
return this.input.test(stack);
}
2019-02-27 19:53:05 +01:00
public Ingredient getInput() {
2019-02-27 19:53:05 +01:00
return this.input;
}
2016-01-05 04:47:35 +01:00
public EffectInstance[] getEffects() {
2016-01-05 04:47:35 +01:00
return this.effects;
}
public boolean effect(ItemStack stack) {
2016-05-14 13:51:18 +02:00
return ActuallyAdditionsAPI.methodHandler.addEffectToStack(stack, this);
2016-01-05 04:47:35 +01:00
}
public String getExtraText() {
2017-11-02 22:49:53 +01:00
return "";
2016-01-05 04:47:35 +01:00
}
2019-02-27 19:53:05 +01:00
public int getMaxAmplifier() {
2019-02-27 19:53:05 +01:00
return this.maxAmplifier;
}
2016-01-05 04:47:35 +01:00
}