mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-04 20:39:09 +01:00
38 lines
876 B
Java
38 lines
876 B
Java
|
package de.ellpeck.naturesaura.recipes;
|
||
|
|
||
|
import net.minecraft.item.ItemStack;
|
||
|
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
|
||
|
public class AltarRecipe {
|
||
|
|
||
|
public static final List<AltarRecipe> RECIPES = new ArrayList<>();
|
||
|
|
||
|
public final ItemStack input;
|
||
|
public final ItemStack output;
|
||
|
public final int aura;
|
||
|
public final int time;
|
||
|
|
||
|
public AltarRecipe(ItemStack input, ItemStack output, int aura, int time) {
|
||
|
this.input = input;
|
||
|
this.output = output;
|
||
|
this.aura = aura;
|
||
|
this.time = time;
|
||
|
}
|
||
|
|
||
|
public static AltarRecipe forInput(ItemStack input) {
|
||
|
for (AltarRecipe recipe : RECIPES) {
|
||
|
if (recipe.input.isItemEqual(input)) {
|
||
|
return recipe;
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
public AltarRecipe add() {
|
||
|
RECIPES.add(this);
|
||
|
return this;
|
||
|
}
|
||
|
}
|