Readd reverted EntityLiving patch
This commit is contained in:
parent
04c149fa11
commit
8948a00d60
1 changed files with 31 additions and 0 deletions
|
@ -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<Integer> 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);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue