Fix another problem caused by shifting idmap. Closes #147

This commit is contained in:
Vincent Lee committed 2016-02-29 19:00:15 -06:00
1 parent ae89d0f18d
commit c6420168aa
2 files changed
+10 -3

No files matched your search

@@ -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<PotionEffectShim> 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<PotionEffect> getPotionEffects(ItemStack stack) {
return effects.stream().map(PotionEffectShim::toVanilla).collect(Collectors.toList());
return getPotionEffectsShim(stack).stream().map(PotionEffectShim::toVanilla).collect(Collectors.toList());
}
}
@@ -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);