Refactor everything to WayofTime.bloodmagic.*
This commit is contained in:
parent
46742a73d1
commit
096ba02450
771 changed files with 566 additions and 573 deletions
|
@ -0,0 +1,25 @@
|
|||
package WayofTime.bloodmagic.api.registry;
|
||||
|
||||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||
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<ItemStack, AltarRecipe> recipes = HashBiMap.create();
|
||||
|
||||
public static void registerRecipe(AltarRecipe recipe) {
|
||||
if (!recipes.containsValue(recipe))
|
||||
recipes.put(recipe.input, recipe);
|
||||
else
|
||||
BloodMagicAPI.getLogger().error("Error adding recipe for " + recipe.input.getDisplayName() + (recipe.output == null ? "" : " -> " + recipe.output.getDisplayName()) + ". Recipe already exists.");
|
||||
}
|
||||
|
||||
public static AltarRecipe getRecipeForInput(ItemStack input) {
|
||||
return recipes.get(input);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue