From 52ea2a0cd9f396d6d525008f08766a749310ec5f Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 10 Nov 2018 05:15:21 +0000 Subject: [PATCH] Fix SpongeAbsortEvent handling Only process drops when the block is actually going to be removed --- .../net/minecraft/world/level/block/SpongeBlock.java.patch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch index c77182c079..d0c197c400 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch @@ -37,7 +37,7 @@ if (!fluid.is(FluidTags.WATER)) { return BlockPos.TraversalNodeStatus.SKIP; -@@ -78,27 +88,64 @@ +@@ -78,27 +88,68 @@ if (block instanceof BucketPickup) { BucketPickup ifluidsource = (BucketPickup) block; @@ -96,7 +96,11 @@ + } else if (iblockdata.is(Blocks.KELP) || iblockdata.is(Blocks.KELP_PLANT) || iblockdata.is(Blocks.SEAGRASS) || iblockdata.is(Blocks.TALL_SEAGRASS)) { + BlockEntity tileentity = iblockdata.hasBlockEntity() ? world.getBlockEntity(blockposition1) : null; + ++ // Paper start - Fix SpongeAbsortEvent handling ++ if (block.getHandle().isAir()) { + dropResources(iblockdata, world, blockposition1, tileentity); ++ } ++ // Paper end - Fix SpongeAbsortEvent handling + } + } + world.setBlock(blockposition1, block.getHandle(), block.getFlag());