Added SoulForgeRecipe (basically a modified ShapelessOreRecipe, so is compatible with the oredictionary), and worked on the shift-clicking into the inventory.
This commit is contained in:
parent
a9feeade13
commit
7b8646659a
7 changed files with 338 additions and 29 deletions
|
@ -0,0 +1,37 @@
|
|||
package WayofTime.bloodmagic.api.registry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.api.recipe.SoulForgeRecipe;
|
||||
|
||||
public class SoulForgeRecipeRegistry
|
||||
{
|
||||
public static List<SoulForgeRecipe> recipeList = new ArrayList<SoulForgeRecipe>();
|
||||
|
||||
public static void registerRecipe(SoulForgeRecipe recipe)
|
||||
{
|
||||
recipeList.add(recipe);
|
||||
}
|
||||
|
||||
public static void registerRecipe(ItemStack outputStack, double minimulSouls, double drain, Object... objects)
|
||||
{
|
||||
registerRecipe(new SoulForgeRecipe(outputStack, minimulSouls, drain, objects));
|
||||
}
|
||||
|
||||
public static SoulForgeRecipe getMatchingRecipe(List<ItemStack> itemList, World world, BlockPos pos)
|
||||
{
|
||||
for (SoulForgeRecipe recipe : recipeList)
|
||||
{
|
||||
if (recipe.matches(itemList, world, pos))
|
||||
{
|
||||
return recipe;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue