Fix FillBucketEvent to work with stacked buckets. New change in 1.3
This commit is contained in:
parent
2b9a80bfdd
commit
8882388902
1 changed files with 17 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
public class ItemBucket extends Item
|
||||
{
|
||||
@@ -31,6 +34,17 @@
|
||||
@@ -31,6 +34,32 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -20,8 +20,23 @@
|
|||
+
|
||||
+ if (event.isHandeled())
|
||||
+ {
|
||||
+ 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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue