2018-05-07 22:10:59 -04:00
|
|
|
package WayofTime.bloodmagic.api.impl.recipe;
|
|
|
|
|
|
|
|
import com.google.common.base.Preconditions;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.item.crafting.Ingredient;
|
|
|
|
import net.minecraft.util.NonNullList;
|
|
|
|
|
|
|
|
import javax.annotation.Nonnegative;
|
|
|
|
import javax.annotation.Nonnull;
|
|
|
|
|
2019-04-14 08:22:42 -07:00
|
|
|
public class RecipeSacrificeCraft {
|
2018-05-07 22:10:59 -04:00
|
|
|
@Nonnull
|
|
|
|
private final NonNullList<Ingredient> input;
|
|
|
|
@Nonnull
|
|
|
|
private final ItemStack output;
|
|
|
|
@Nonnegative
|
|
|
|
private final double healthRequired;
|
|
|
|
|
2019-04-14 08:22:42 -07:00
|
|
|
public RecipeSacrificeCraft(@Nonnull NonNullList<Ingredient> input, @Nonnull ItemStack output, @Nonnegative double healthRequired) {
|
2018-05-07 22:10:59 -04:00
|
|
|
Preconditions.checkNotNull(input, "input cannot be null.");
|
|
|
|
Preconditions.checkNotNull(output, "output cannot be null.");
|
|
|
|
Preconditions.checkArgument(healthRequired >= 0, "healthRequired cannot be negative.");
|
|
|
|
|
|
|
|
this.input = input;
|
|
|
|
this.output = output;
|
|
|
|
this.healthRequired = healthRequired;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Nonnull
|
2019-04-14 08:22:42 -07:00
|
|
|
public final NonNullList<Ingredient> getInput() {
|
2018-05-07 22:10:59 -04:00
|
|
|
return input;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Nonnull
|
2019-04-14 08:22:42 -07:00
|
|
|
public final ItemStack getOutput() {
|
2018-05-07 22:10:59 -04:00
|
|
|
return output;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Nonnegative
|
2019-04-14 08:22:42 -07:00
|
|
|
public final double getHealthRequired() {
|
2018-05-07 22:10:59 -04:00
|
|
|
return healthRequired;
|
|
|
|
}
|
|
|
|
}
|