diff --git a/patches/common/net/minecraft/src/EntityLiving.java.patch b/patches/common/net/minecraft/src/EntityLiving.java.patch index 473aae7755..018eefd6a5 100644 --- a/patches/common/net/minecraft/src/EntityLiving.java.patch +++ b/patches/common/net/minecraft/src/EntityLiving.java.patch @@ -142,3 +142,34 @@ } /** +@@ -2180,4 +2228,30 @@ + this.worldObj.spawnParticle("iconcrack_" + par1ItemStack.getItem().shiftedIndex, var4.xCoord, var4.yCoord, var4.zCoord, var3.xCoord, var3.yCoord + 0.05D, var3.zCoord); + } + } ++ ++ /*** ++ * Removes all potion effects that have curativeItem as a curative item for its effect ++ * @param curativeItem The itemstack we are using to cure potion effects ++ */ ++ public void curePotionEffects(ItemStack curativeItem) ++ { ++ Iterator potionKey = activePotionsMap.keySet().iterator(); ++ ++ if (worldObj.isRemote) ++ { ++ return; ++ } ++ ++ while (potionKey.hasNext()) ++ { ++ Integer key = potionKey.next(); ++ PotionEffect effect = (PotionEffect)activePotionsMap.get(key); ++ ++ if (effect.isCurativeItem(curativeItem)) ++ { ++ potionKey.remove(); ++ onFinishedPotionEffect(effect); ++ } ++ } ++ } + }