public static FluidStack getPotionFluid(int amount, ItemStack stack) { Item item = stack.getItem(); if (item.equals(Items.POTIONITEM)) { return getPotion(amount, PotionUtils.getPotionFromItem(stack)); } else if (item.equals(Items.SPLASH_POTION)) { return getSplashPotion(amount, PotionUtils.getPotionFromItem(stack)); } else if (item.equals(Items.LINGERING_POTION)) { return getLingeringPotion(amount, PotionUtils.getPotionFromItem(stack)); } return null; }
public static void addSwapPotionRecipes(PotionType potion) { addRecipe(DEFAULT_ENERGY, new ItemStack(Items.GUNPOWDER), TFFluids.getPotion(DEFAULT_AMOUNT, potion), TFFluids.getSplashPotion(DEFAULT_AMOUNT, potion)); addRecipe(DEFAULT_ENERGY, new ItemStack(Items.DRAGON_BREATH), TFFluids.getSplashPotion(DEFAULT_AMOUNT, potion), TFFluids.getLingeringPotion(DEFAULT_AMOUNT, potion)); }
public static void addDefaultPotionRecipes(PotionType input, ItemStack reagent, PotionType output) { addRecipe(DEFAULT_ENERGY, reagent, TFFluids.getPotion(DEFAULT_AMOUNT, input), TFFluids.getPotion(DEFAULT_AMOUNT, output)); addRecipe(DEFAULT_ENERGY, reagent, TFFluids.getSplashPotion(DEFAULT_AMOUNT, input), TFFluids.getSplashPotion(DEFAULT_AMOUNT, output)); addRecipe(DEFAULT_ENERGY, reagent, TFFluids.getLingeringPotion(DEFAULT_AMOUNT, input), TFFluids.getLingeringPotion(DEFAULT_AMOUNT, output)); addSwapPotionRecipes(input); addSwapPotionRecipes(output); }
public static void addDefaultPotionRecipes(PotionType type) { addFillRecipe(DEFAULT_ENERGY * 2, new ItemStack(Items.GLASS_BOTTLE), PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM, 1), type), TFFluids.getPotion(CoreProps.BOTTLE_VOLUME, type), true); addFillRecipe(DEFAULT_ENERGY * 2, new ItemStack(Items.GLASS_BOTTLE), PotionUtils.addPotionToItemStack(new ItemStack(Items.SPLASH_POTION, 1), type), TFFluids.getSplashPotion(CoreProps.BOTTLE_VOLUME, type), true); addFillRecipe(DEFAULT_ENERGY * 2, new ItemStack(Items.GLASS_BOTTLE), PotionUtils.addPotionToItemStack(new ItemStack(Items.LINGERING_POTION, 1), type), TFFluids.getLingeringPotion(CoreProps.BOTTLE_VOLUME, type), true); addFillRecipe(DEFAULT_ENERGY, new ItemStack(Items.ARROW), PotionUtils.addPotionToItemStack(new ItemStack(Items.TIPPED_ARROW), type), TFFluids.getLingeringPotion(CoreProps.BOTTLE_VOLUME / 10, type), false); }