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>
71 lines
2 KiB
Java
71 lines
2 KiB
Java
package de.ellpeck.actuallyadditions.common.recipes;
|
|
|
|
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.item.crafting.IRecipeSerializer;
|
|
import net.minecraft.item.crafting.IRecipeType;
|
|
import net.minecraft.item.crafting.Ingredient;
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
import javax.annotation.Nonnull;
|
|
|
|
/**
|
|
* Recipe class for the AtomicReconstructor when hitting a items stack
|
|
*/
|
|
public class AtomicReconstructorItemRecipe implements IDummyRecipe<AtomicReconstructorItemRecipe> {
|
|
|
|
public static final IRecipeType<AtomicReconstructorItemRecipe> ATOMIC_RECONSTRUCTOR_ITEM_RECIPE_TYPE = IRecipeType.register("actuallyadditions:atomic_reconstructor_item");
|
|
|
|
@Nonnull private final ResourceLocation recipeId;
|
|
|
|
@Nonnull private final Lens lens;
|
|
@Nonnull private final Ingredient input;
|
|
@Nonnull private final ItemStack output;
|
|
private final int energyConsumption;
|
|
|
|
public AtomicReconstructorItemRecipe(@Nonnull ResourceLocation recipeId, @Nonnull Lens lens, @Nonnull Ingredient input, @Nonnull ItemStack output, int energyConsumption){
|
|
this.recipeId = recipeId;
|
|
this.lens = lens;
|
|
this.input = input;
|
|
this.output = output;
|
|
this.energyConsumption = energyConsumption;
|
|
}
|
|
|
|
@Nonnull
|
|
public Lens getLens(){
|
|
return lens;
|
|
}
|
|
|
|
@Nonnull
|
|
public Ingredient getInput(){
|
|
return input;
|
|
}
|
|
|
|
@Nonnull
|
|
public ItemStack getOutput(){
|
|
return output;
|
|
}
|
|
|
|
public int getEnergyConsumption(){
|
|
return energyConsumption;
|
|
}
|
|
|
|
@Nonnull
|
|
@Override
|
|
public ResourceLocation getId(){
|
|
return this.recipeId;
|
|
}
|
|
|
|
@Nonnull
|
|
@Override
|
|
public IRecipeSerializer<AtomicReconstructorItemRecipe> getSerializer(){
|
|
return AtomicReconstructorItemRecipeFactory.INSTANCE;
|
|
}
|
|
|
|
@Nonnull
|
|
@Override
|
|
public IRecipeType<?> getType(){
|
|
return ATOMIC_RECONSTRUCTOR_ITEM_RECIPE_TYPE;
|
|
}
|
|
}
|