From bf6c31c8795b9ab1051e046836ba77de4f62b715 Mon Sep 17 00:00:00 2001 From: minzmann Date: Sat, 12 Dec 2015 17:05:14 +0100 Subject: [PATCH] Update PotionEffect.java.patch --- .../net/minecraft/potion/PotionEffect.java.patch | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/patches/minecraft/net/minecraft/potion/PotionEffect.java.patch b/patches/minecraft/net/minecraft/potion/PotionEffect.java.patch index e23ad06dc6..81b132ac38 100644 --- a/patches/minecraft/net/minecraft/potion/PotionEffect.java.patch +++ b/patches/minecraft/net/minecraft/potion/PotionEffect.java.patch @@ -57,16 +57,15 @@ + */ + public boolean isCurativeItem(net.minecraft.item.ItemStack stack) + { -+ boolean found = false; + for (net.minecraft.item.ItemStack curativeItem : this.curativeItems) + { + if (curativeItem.func_77969_a(stack)) + { -+ found = true; ++ return true; + } + } + -+ return found; ++ return false; + } + + /*** @@ -84,15 +83,7 @@ + */ + public void addCurativeItem(net.minecraft.item.ItemStack stack) + { -+ boolean found = false; -+ for (net.minecraft.item.ItemStack curativeItem : this.curativeItems) -+ { -+ if (curativeItem.func_77969_a(stack)) -+ { -+ found = true; -+ } -+ } -+ if (!found) ++ if (!this.isCurativeItem(stack)) + { + this.curativeItems.add(stack); + }