From 88823889021fecef353af1aa7cb959c26135cb30 Mon Sep 17 00:00:00 2001 From: LexManos Date: Tue, 11 Sep 2012 12:45:29 -0700 Subject: [PATCH] Fix FillBucketEvent to work with stacked buckets. New change in 1.3 --- .../net/minecraft/src/ItemBucket.java.patch | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/patches/common/net/minecraft/src/ItemBucket.java.patch b/patches/common/net/minecraft/src/ItemBucket.java.patch index 4b33a0c21..4da9c72b6 100644 --- a/patches/common/net/minecraft/src/ItemBucket.java.patch +++ b/patches/common/net/minecraft/src/ItemBucket.java.patch @@ -8,7 +8,7 @@ public class ItemBucket extends Item { -@@ -31,6 +34,17 @@ +@@ -31,6 +34,32 @@ } else { @@ -20,7 +20,22 @@ + + if (event.isHandeled()) + { -+ return event.result; ++ if (par3EntityPlayer.capabilities.isCreativeMode) ++ { ++ return par1ItemStack; ++ } ++ ++ if (--par1ItemStack.stackSize <= 0) ++ { ++ return event.result; ++ } ++ ++ if (!par3EntityPlayer.inventory.addItemStackToInventory(event.result)) ++ { ++ par3EntityPlayer.dropPlayerItem(event.result); ++ } ++ ++ return par1ItemStack; + } + if (var12.typeOfHit == EnumMovingObjectType.TILE)