summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-07-18 17:48:17 +1000
committermd_5 <git@md-5.net>2018-07-18 17:48:17 +1000
commit3e5fe3e40d94c052bbbb6834bc3d9f88f2cbf152 (patch)
treef38e15f79ed3e70e10362e56ae4c479946558588 /nms-patches
parent65bc676ed092501ce985d1c247d15b2853af84e1 (diff)
downloadcraftbukkit-3e5fe3e40d94c052bbbb6834bc3d9f88f2cbf152.tar
craftbukkit-3e5fe3e40d94c052bbbb6834bc3d9f88f2cbf152.tar.gz
craftbukkit-3e5fe3e40d94c052bbbb6834bc3d9f88f2cbf152.tar.lz
craftbukkit-3e5fe3e40d94c052bbbb6834bc3d9f88f2cbf152.tar.xz
craftbukkit-3e5fe3e40d94c052bbbb6834bc3d9f88f2cbf152.zip
SPIGOT-4042: Fix emptying buckets onto slabs
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/ItemBucket.patch15
1 files changed, 9 insertions, 6 deletions
diff --git a/nms-patches/ItemBucket.patch b/nms-patches/ItemBucket.patch
index 029b2023..5e131a07 100644
--- a/nms-patches/ItemBucket.patch
+++ b/nms-patches/ItemBucket.patch
@@ -41,7 +41,7 @@
BlockPosition blockposition1 = this.a(iblockdata, blockposition, movingobjectposition);
- if (this.a(entityhuman, world, blockposition1, movingobjectposition)) {
-+ if (this.a(entityhuman, world, blockposition1, movingobjectposition, blockposition, itemstack)) { // CraftBukkit
++ if (this.a(entityhuman, world, blockposition1, movingobjectposition, movingobjectposition.direction, blockposition, itemstack)) { // CraftBukkit
this.a(world, itemstack, blockposition1);
if (entityhuman instanceof EntityPlayer) {
CriterionTriggers.y.a((EntityPlayer) entityhuman, blockposition1, itemstack);
@@ -75,21 +75,24 @@
+ // CraftBukkit start
public boolean a(@Nullable EntityHuman entityhuman, World world, BlockPosition blockposition, @Nullable MovingObjectPosition movingobjectposition) {
-+ return a(entityhuman, world, blockposition, movingobjectposition, null, null);
++ return a(entityhuman, world, blockposition, movingobjectposition, null, null, null);
+ }
+
-+ public boolean a(EntityHuman entityhuman, World world, BlockPosition blockposition, @Nullable MovingObjectPosition movingobjectposition, BlockPosition clicked, ItemStack itemstack) {
++ public boolean a(EntityHuman entityhuman, World world, BlockPosition blockposition, @Nullable MovingObjectPosition movingobjectposition, EnumDirection enumdirection, BlockPosition clicked, ItemStack itemstack) {
+ // CraftBukkit end
if (!(this.a instanceof FluidTypeFlowing)) {
return false;
} else {
-@@ -105,6 +129,15 @@
+@@ -103,8 +127,17 @@
+ boolean flag1 = material.isReplaceable();
+
if (!world.isEmpty(blockposition) && !flag && !flag1 && (!(iblockdata.getBlock() instanceof IFluidContainer) || !((IFluidContainer) iblockdata.getBlock()).a((IBlockAccess) world, blockposition, iblockdata, this.a))) {
- return movingobjectposition == null ? false : this.a(entityhuman, world, movingobjectposition.a().shift(movingobjectposition.direction), (MovingObjectPosition) null);
+- return movingobjectposition == null ? false : this.a(entityhuman, world, movingobjectposition.a().shift(movingobjectposition.direction), (MovingObjectPosition) null);
++ return movingobjectposition == null ? false : this.a(entityhuman, world, movingobjectposition.a().shift(movingobjectposition.direction), (MovingObjectPosition) null, enumdirection, clicked, itemstack); // CraftBukkit
} else {
+ // CraftBukkit start
+ if (entityhuman != null) {
-+ PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent(entityhuman, clicked.getX(), clicked.getY(), clicked.getZ(), movingobjectposition.direction, itemstack);
++ PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent(entityhuman, clicked.getX(), clicked.getY(), clicked.getZ(), enumdirection, itemstack);
+ if (event.isCancelled()) {
+ // TODO: inventory not updated
+ return false;