mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-05-07 11:13:55 +02:00
2c07ef0fa0
Removed some Recipes after the decision to not port it or change it to loot tables in favor of recipes. A lot more @Nonnull annotations. Signed-off-by: canitzp <canitzp@gmail.com>
59 lines
1.7 KiB
Java
59 lines
1.7 KiB
Java
package de.ellpeck.actuallyadditions.common.recipes;
|
|
|
|
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;
|
|
|
|
import javax.annotation.Nonnull;
|
|
|
|
public class CoffeeMachineIngredient implements IDummyRecipe<CoffeeMachineIngredient> {
|
|
|
|
public static final IRecipeType<CoffeeMachineIngredient> COFFEE_MACHINE_RECIPE_TYPE = IRecipeType.register("actuallyadditions:coffee_machine");
|
|
|
|
@Nonnull private final ResourceLocation recipeId;
|
|
@Nonnull private final Ingredient input;
|
|
private final int maxAmplifier;
|
|
@Nonnull private final EffectInstance[] effects;
|
|
|
|
public CoffeeMachineIngredient(@Nonnull ResourceLocation recipeId, @Nonnull Ingredient input, int maxAmplifier, @Nonnull EffectInstance[] effects){
|
|
this.recipeId = recipeId;
|
|
this.input = input;
|
|
this.maxAmplifier = maxAmplifier;
|
|
this.effects = effects;
|
|
}
|
|
|
|
@Nonnull
|
|
public Ingredient getInput(){
|
|
return input;
|
|
}
|
|
|
|
public int getMaxAmplifier(){
|
|
return maxAmplifier;
|
|
}
|
|
|
|
@Nonnull
|
|
public EffectInstance[] getEffects(){
|
|
return effects;
|
|
}
|
|
|
|
@Nonnull
|
|
@Override
|
|
public ResourceLocation getId(){
|
|
return this.recipeId;
|
|
}
|
|
|
|
@Nonnull
|
|
@Override
|
|
public IRecipeSerializer<CoffeeMachineIngredient> getSerializer(){
|
|
return CoffeeMachineIngredientFactory.INSTANCE;
|
|
}
|
|
|
|
@Nonnull
|
|
@Override
|
|
public IRecipeType<?> getType(){
|
|
return COFFEE_MACHINE_RECIPE_TYPE;
|
|
}
|
|
}
|