From c6420168aa29c886856f7fe54672e61d295be393 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Mon, 29 Feb 2016 19:00:15 -0600 Subject: [PATCH] Fix another problem caused by shifting idmap. Closes #147 --- src/main/java/vazkii/botania/api/brew/Brew.java | 11 +++++++++-- .../botania/common/item/brew/ItemIncenseStick.java | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/vazkii/botania/api/brew/Brew.java b/src/main/java/vazkii/botania/api/brew/Brew.java index 9e1d92ff6..916388c08 100644 --- a/src/main/java/vazkii/botania/api/brew/Brew.java +++ b/src/main/java/vazkii/botania/api/brew/Brew.java @@ -117,12 +117,19 @@ public class Brew { } /** - * Gets the list of potion effects for the ItemStack passed in. + * Get the PotionEffectShim's that this brew has. + */ + public List getPotionEffectsShim(ItemStack stack) { + return effects; + } + + /** + * Gets the list of vanilla PotionEffects for the ItemStack passed in. * Note that for the lexicon, this passes in a botania Managlass * Vial or an Alfglass Flask at all times. */ public List getPotionEffects(ItemStack stack) { - return effects.stream().map(PotionEffectShim::toVanilla).collect(Collectors.toList()); + return getPotionEffectsShim(stack).stream().map(PotionEffectShim::toVanilla).collect(Collectors.toList()); } } diff --git a/src/main/java/vazkii/botania/common/item/brew/ItemIncenseStick.java b/src/main/java/vazkii/botania/common/item/brew/ItemIncenseStick.java index 1e4cb9507..a4ac14ecf 100644 --- a/src/main/java/vazkii/botania/common/item/brew/ItemIncenseStick.java +++ b/src/main/java/vazkii/botania/common/item/brew/ItemIncenseStick.java @@ -107,7 +107,7 @@ public class ItemIncenseStick extends ItemMod implements IBrewItem, IBrewContain @Override public ItemStack getItemForBrew(Brew brew, ItemStack stack) { - if(!brew.canInfuseIncense() || brew.getPotionEffects(stack).size() != 1 || GameData.getPotionRegistry().getObjectById(brew.getPotionEffects(stack).get(0).getPotionID()).isInstant()) + if(!brew.canInfuseIncense() || brew.getPotionEffectsShim(stack).size() != 1 || brew.getPotionEffectsShim(stack).get(0).potion.isInstant()) return null; ItemStack brewStack = new ItemStack(this);