2020-09-20 12:14:48 +02:00
|
|
|
package de.ellpeck.actuallyadditions.common.recipes;
|
2020-09-18 07:56:55 +02:00
|
|
|
|
|
|
|
import net.minecraft.item.crafting.IRecipeSerializer;
|
|
|
|
import net.minecraft.item.crafting.IRecipeType;
|
|
|
|
import net.minecraft.item.crafting.Ingredient;
|
|
|
|
import net.minecraft.potion.EffectInstance;
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
|
2020-10-07 08:25:54 +02:00
|
|
|
import javax.annotation.Nonnull;
|
|
|
|
|
|
|
|
public class CoffeeMachineIngredient implements IDummyRecipe<CoffeeMachineIngredient> {
|
2020-09-18 07:56:55 +02:00
|
|
|
|
|
|
|
public static final IRecipeType<CoffeeMachineIngredient> COFFEE_MACHINE_RECIPE_TYPE = IRecipeType.register("actuallyadditions:coffee_machine");
|
|
|
|
|
2020-10-07 08:25:54 +02:00
|
|
|
@Nonnull private final ResourceLocation recipeId;
|
|
|
|
@Nonnull private final Ingredient input;
|
|
|
|
private final int maxAmplifier;
|
|
|
|
@Nonnull private final EffectInstance[] effects;
|
2020-09-18 07:56:55 +02:00
|
|
|
|
2020-10-07 08:25:54 +02:00
|
|
|
public CoffeeMachineIngredient(@Nonnull ResourceLocation recipeId, @Nonnull Ingredient input, int maxAmplifier, @Nonnull EffectInstance[] effects){
|
2020-09-18 07:56:55 +02:00
|
|
|
this.recipeId = recipeId;
|
|
|
|
this.input = input;
|
|
|
|
this.maxAmplifier = maxAmplifier;
|
|
|
|
this.effects = effects;
|
|
|
|
}
|
|
|
|
|
2020-10-07 08:25:54 +02:00
|
|
|
@Nonnull
|
2020-09-18 07:56:55 +02:00
|
|
|
public Ingredient getInput(){
|
|
|
|
return input;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getMaxAmplifier(){
|
|
|
|
return maxAmplifier;
|
|
|
|
}
|
|
|
|
|
2020-10-07 08:25:54 +02:00
|
|
|
@Nonnull
|
2020-09-18 07:56:55 +02:00
|
|
|
public EffectInstance[] getEffects(){
|
|
|
|
return effects;
|
|
|
|
}
|
|
|
|
|
2020-10-07 08:25:54 +02:00
|
|
|
@Nonnull
|
2020-09-18 07:56:55 +02:00
|
|
|
@Override
|
|
|
|
public ResourceLocation getId(){
|
|
|
|
return this.recipeId;
|
|
|
|
}
|
|
|
|
|
2020-10-07 08:25:54 +02:00
|
|
|
@Nonnull
|
2020-09-18 07:56:55 +02:00
|
|
|
@Override
|
2020-10-07 08:25:54 +02:00
|
|
|
public IRecipeSerializer<CoffeeMachineIngredient> getSerializer(){
|
2020-09-18 07:56:55 +02:00
|
|
|
return CoffeeMachineIngredientFactory.INSTANCE;
|
|
|
|
}
|
|
|
|
|
2020-10-07 08:25:54 +02:00
|
|
|
@Nonnull
|
2020-09-18 07:56:55 +02:00
|
|
|
@Override
|
|
|
|
public IRecipeType<?> getType(){
|
|
|
|
return COFFEE_MACHINE_RECIPE_TYPE;
|
|
|
|
}
|
|
|
|
}
|