From b3a140b8dd55ccfccc8f29b3916ec179a8de820a Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Sat, 23 Jan 2016 12:50:42 -0600 Subject: [PATCH] Temporary bandaid for thaumcraft brew integration. Closes #69. --- src/main/java/vazkii/botania/common/brew/ModBrews.java | 8 ++------ .../vazkii/botania/common/crafting/ModBrewRecipes.java | 2 +- .../java/vazkii/botania/common/lexicon/LexiconData.java | 7 ++++--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/java/vazkii/botania/common/brew/ModBrews.java b/src/main/java/vazkii/botania/common/brew/ModBrews.java index 0d6cc9d86..03e191859 100644 --- a/src/main/java/vazkii/botania/common/brew/ModBrews.java +++ b/src/main/java/vazkii/botania/common/brew/ModBrews.java @@ -67,12 +67,8 @@ public class ModBrews { } public static void initTC() { - Potion warpWardPotion = null; - for(Potion potion : GameData.getPotionRegistry().typeSafeIterable()) - if(potion != null && potion.getName().equals("potion.warpward")) { - warpWardPotion = potion; - break; - } + Potion warpWardPotion = Potion.getPotionFromResourceLocation("minecraft:warp_ward"); + // TODO thaumcraft 5 is currently registering its potions under the Minecraft namespace if(warpWardPotion != null) warpWard = new BrewMod(LibBrewNames.WARP_WARD, 0xFBBDFF, 25000, new PotionEffect(warpWardPotion.id, 12000, 0)).setNotBloodPendantInfusable(); diff --git a/src/main/java/vazkii/botania/common/crafting/ModBrewRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModBrewRecipes.java index 805deb042..de537025c 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModBrewRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModBrewRecipes.java @@ -75,7 +75,7 @@ public class ModBrewRecipes { Item resource = Item.itemRegistry.getObject(new ResourceLocation("thaumcraft", "salis_mundus")); Item bathSalts = Item.itemRegistry.getObject(new ResourceLocation("thaumcraft", "bath_salts")); - warpWardBrew = BotaniaAPI.registerBrewRecipe(ModBrews.warpWard, new ItemStack(Items.nether_wart), new ItemStack(resource, 1, 14), new ItemStack(bathSalts), new ItemStack(resource, 1, 6)); + // todo 1.8 see LexiconData: warpWardBrew = BotaniaAPI.registerBrewRecipe(ModBrews.warpWard, new ItemStack(Items.nether_wart), new ItemStack(resource, 1, 14), new ItemStack(bathSalts), new ItemStack(resource, 1, 6)); } diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java index 223a743f4..c7f1083e3 100644 --- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java +++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java @@ -1106,10 +1106,11 @@ public final class LexiconData { if(Botania.thaumcraftLoaded) { tcIntegration = new CLexiconEntry(LibLexicon.MISC_TC_INTEGRATION, BotaniaAPI.categoryMisc, "Thaumcraft"); - + + // todo 1.8: we removed our after thaumcraft dep, but it turns out we actually need it. Stub out warp ward brew from rendering for now until discussion w/ Azanor if(ConfigHandler.enableThaumcraftStablizers) - tcIntegration.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeHelmetOfRevealing), new PageText("3"), new PageManaInfusionRecipe("4", ModManaInfusionRecipes.manaInkwellRecipe), new PageText("5"), new PageBrew(ModBrewRecipes.warpWardBrew, "6a", "6b")).setIcon(new ItemStack(ModItems.manaInkwell)); - else tcIntegration.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeHelmetOfRevealing), new PageText("3"), new PageManaInfusionRecipe("4", ModManaInfusionRecipes.manaInkwellRecipe), new PageBrew(ModBrewRecipes.warpWardBrew, "6a", "6b")).setIcon(new ItemStack(ModItems.manaInkwell)); + tcIntegration.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeHelmetOfRevealing), new PageText("3"), new PageManaInfusionRecipe("4", ModManaInfusionRecipes.manaInkwellRecipe), new PageText("5")/*, new PageBrew(ModBrewRecipes.warpWardBrew, "6a", "6b")*/).setIcon(new ItemStack(ModItems.manaInkwell)); + else tcIntegration.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeHelmetOfRevealing), new PageText("3"), new PageManaInfusionRecipe("4", ModManaInfusionRecipes.manaInkwellRecipe)/*, new PageBrew(ModBrewRecipes.warpWardBrew, "6a", "6b")*/).setIcon(new ItemStack(ModItems.manaInkwell)); } if(Botania.etFuturumLoaded) {