2021-06-13 10:26:58 +02:00
|
|
|
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
|
2024-10-23 14:12:17 +02:00
|
|
|
index 569bdef574680319b4fd6569ef05b2b3c04c739d..59cf905b1b5686f6f4f2bad94730ffa69d3a2834 100644
|
2021-06-13 10:26:58 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
2024-10-23 14:12:17 +02:00
|
|
|
@@ -137,7 +137,11 @@ public class SpongeBlock extends Block {
|
2023-06-07 22:41:26 +02:00
|
|
|
} 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;
|
|
|
|
|
2024-01-21 13:56:22 +01:00
|
|
|
+ // Paper start - Fix SpongeAbsortEvent handling
|
2023-06-08 00:28:06 +02:00
|
|
|
+ if (block.getHandle().isAir()) {
|
2023-06-07 22:41:26 +02:00
|
|
|
dropResources(iblockdata, world, blockposition1, tileentity);
|
2021-06-13 10:26:58 +02:00
|
|
|
+ }
|
2024-01-21 13:56:22 +01:00
|
|
|
+ // Paper end - Fix SpongeAbsortEvent handling
|
2021-06-13 10:26:58 +02:00
|
|
|
}
|
|
|
|
}
|
2023-06-07 22:41:26 +02:00
|
|
|
world.setBlock(blockposition1, block.getHandle(), block.getFlag());
|