mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 06:53:20 +00:00
Fix FillBucketEvent to work with stacked buckets. New change in 1.3
This commit is contained in:
1 parent
2b9a80bfdd
commit
8882388902
1 file changed
+17
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user