From e2403a3d2c4480f129ff5299bc20b3ba60027c5c Mon Sep 17 00:00:00 2001 From: Parker Hawke Date: Mon, 29 Jun 2020 11:09:50 +1000 Subject: [PATCH] SPIGOT-5882: NPE when emptying bucket on already waterlogged blocks --- nms-patches/ItemBucket.patch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nms-patches/ItemBucket.patch b/nms-patches/ItemBucket.patch index 0469ba2093..630d3d06e7 100644 --- a/nms-patches/ItemBucket.patch +++ b/nms-patches/ItemBucket.patch @@ -59,7 +59,7 @@ if (!(this.fluidType instanceof FluidTypeFlowing)) { return false; } else { -@@ -86,6 +108,16 @@ +@@ -86,8 +108,18 @@ boolean flag = iblockdata.a(this.fluidType); boolean flag1 = iblockdata.isAir() || flag || block instanceof IFluidContainer && ((IFluidContainer) block).canPlace(world, blockposition, iblockdata, this.fluidType); @@ -74,5 +74,8 @@ + } + // CraftBukkit end if (!flag1) { - return movingobjectpositionblock != null && this.a(entityhuman, world, movingobjectpositionblock.getBlockPosition().shift(movingobjectpositionblock.getDirection()), (MovingObjectPositionBlock) null); +- return movingobjectpositionblock != null && this.a(entityhuman, world, movingobjectpositionblock.getBlockPosition().shift(movingobjectpositionblock.getDirection()), (MovingObjectPositionBlock) null); ++ return movingobjectpositionblock != null && this.a(entityhuman, world, movingobjectpositionblock.getBlockPosition().shift(movingobjectpositionblock.getDirection()), (MovingObjectPositionBlock) null, enumdirection, clicked, itemstack); // CraftBukkit } else if (world.getDimensionManager().isNether() && this.fluidType.a((Tag) TagsFluid.WATER)) { + int i = blockposition.getX(); + int j = blockposition.getY();