Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package dovahofkiin.brewery;
- import java.util.ArrayList;
- import java.util.List;
- import net.minecraft.block.Block;
- import net.minecraft.init.Blocks;
- import net.minecraft.init.Items;
- import net.minecraft.init.PotionTypes;
- import net.minecraft.item.ItemStack;
- import net.minecraft.potion.PotionUtils;
- public class BreweryRecipeHelper {
- private static List<ArrayList<Object>> recipeList = new ArrayList<ArrayList<Object>>();
- public static void init() {
- ArrayList<Object> swiftPot = new ArrayList<Object>();
- swiftPot.add(Blocks.glowstone);
- swiftPot.add(Blocks.dirt);
- swiftPot.add(PotionUtils.addPotionToItemStack(new ItemStack(Items.potionitem, 1),
- PotionTypes.swiftness));
- ArrayList<Object> slowPot = new ArrayList<Object>();
- slowPot.add(Blocks.dirt);
- slowPot.add(Blocks.obsidian);
- slowPot.add(PotionUtils.addPotionToItemStack(new ItemStack(Items.potionitem, 1),
- PotionTypes.slowness));
- recipeList.add(swiftPot);
- recipeList.add(slowPot);
- }
- public static ItemStack checkIfRecipeExists(Block a, Block b) {
- for (ArrayList<Object> al : recipeList) {
- if (((Block) al.get(0) == a && (Block) al.get(1) == b) || ((Block) al.get(0) == b && (Block) al.get(1) == a)) {
- return (ItemStack) al.get(2);
- }
- }
- return null;
- }
- }
Add Comment
Please, Sign In to add comment