Altar works

This commit is contained in:
Arcaratus 2015-11-27 20:15:19 -05:00
parent 352c6b9e5f
commit a6d329cf98
12 changed files with 266 additions and 110 deletions

View file

@ -1,16 +1,16 @@
package WayofTime.bloodmagic.api.registry;
import WayofTime.bloodmagic.api.BloodMagicAPI;
import WayofTime.bloodmagic.api.ItemStackWrapper;
import WayofTime.bloodmagic.api.altar.AltarRecipe;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import lombok.Getter;
import net.minecraft.item.ItemStack;
public class AltarRecipeRegistry {
@Getter
private static BiMap<ItemStackWrapper, AltarRecipe> recipes = HashBiMap.create();
private static BiMap<ItemStack, AltarRecipe> recipes = HashBiMap.create();
public static void registerRecipe(AltarRecipe recipe) {
if (!recipes.containsValue(recipe))
@ -19,7 +19,7 @@ public class AltarRecipeRegistry {
BloodMagicAPI.getLogger().error("Error adding recipe for " + recipe.input.getDisplayName() + (recipe.output == null ? "" : " -> " + recipe.output.getDisplayName()) + ". Recipe already exists.");
}
public static AltarRecipe getRecipeForInput(ItemStackWrapper input) {
public static AltarRecipe getRecipeForInput(ItemStack input) {
return recipes.get(input);
}
}