aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0280-Fix-SpongeAbsortEvent-handling.patch
blob: 019425b6f9e35ec1197a8d265154d383d2ac0af6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
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

diff --git a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
index d2c2adb0484985897db5f4fdc9b88f0e4b2c3235..d810f6bf9a8a354e5b8994e51ec3672428277dde 100644
--- a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
@@ -127,7 +127,11 @@ public class SpongeBlock extends Block {
                     } 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
+                        if (block.getHandle().isAir()) {
                         dropResources(iblockdata, world, blockposition1, tileentity);
+                        }
+                        // Paper end
                     }
                 }
                 world.setBlock(blockposition1, block.getHandle(), block.getFlag());