diff options
author | md_5 <git@md-5.net> | 2016-03-06 16:41:13 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-06 16:41:13 +1100 |
commit | 55b0def5d9bd491382877a7e680da6f6e5061ce0 (patch) | |
tree | 4828efd215da9a1d25569c2d4a11d902bf00d080 /nms-patches | |
parent | 23a94053b049c23ac77ac57fea30891e11fd99f6 (diff) | |
download | craftbukkit-55b0def5d9bd491382877a7e680da6f6e5061ce0.tar craftbukkit-55b0def5d9bd491382877a7e680da6f6e5061ce0.tar.gz craftbukkit-55b0def5d9bd491382877a7e680da6f6e5061ce0.tar.lz craftbukkit-55b0def5d9bd491382877a7e680da6f6e5061ce0.tar.xz craftbukkit-55b0def5d9bd491382877a7e680da6f6e5061ce0.zip |
SPIGOT-1790: Fix bucket behaviour
Diffstat (limited to 'nms-patches')
-rw-r--r-- | nms-patches/ItemBucket.patch | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nms-patches/ItemBucket.patch b/nms-patches/ItemBucket.patch index 36903ba9..9b3780c7 100644 --- a/nms-patches/ItemBucket.patch +++ b/nms-patches/ItemBucket.patch @@ -50,7 +50,7 @@ if (!entityhuman.a(blockposition1, movingobjectposition.direction, itemstack)) { return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack); - } else if (this.a(entityhuman, world, blockposition1)) { -+ } else if (this.a(entityhuman, world, blockposition, movingobjectposition.direction, itemstack)) { // CraftBukkit ++ } else if (this.a(entityhuman, world, blockposition1, movingobjectposition.direction, blockposition, itemstack)) { // CraftBukkit entityhuman.b(StatisticList.b((Item) this)); return !entityhuman.abilities.canInstantlyBuild ? new InteractionResultWrapper(EnumInteractionResult.SUCCESS, new ItemStack(Items.BUCKET)) : new InteractionResultWrapper(EnumInteractionResult.SUCCESS, itemstack); } else { @@ -79,10 +79,10 @@ + // CraftBukkit start public boolean a(EntityHuman entityhuman, World world, BlockPosition blockposition) { -+ return a(entityhuman, world, blockposition, null, null); ++ return a(entityhuman, world, blockposition, null, blockposition, null); + } + -+ public boolean a(EntityHuman entityhuman, World world, BlockPosition blockposition, EnumDirection enumdirection, ItemStack itemstack) { ++ public boolean a(EntityHuman entityhuman, World world, BlockPosition blockposition, EnumDirection enumdirection, BlockPosition clicked, ItemStack itemstack) { + // CraftBukkit end if (this.a == Blocks.AIR) { return false; @@ -93,7 +93,7 @@ } else { + // CraftBukkit start + if (entityhuman != null) { -+ PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent(entityhuman, blockposition.getX(), blockposition.getY(), blockposition.getZ(), enumdirection, itemstack); ++ PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent(entityhuman, clicked.getX(), clicked.getY(), clicked.getZ(), enumdirection, itemstack); + if (event.isCancelled()) { + // TODO: inventory not updated + return false; |