mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 11:42:55 +01:00
4104545b11
"It was from a different time before books were as jank as they are now. As time has gone on they've only proven to be worse and worse."
25 lines
1.4 KiB
Diff
25 lines
1.4 KiB
Diff
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 b8ae2000a44469245c6ba3cda0c0e87b07156b06..1ef8eadd4e59f2e5d2bbd84f6f9bcf37b59db5bd 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
|
@@ -130,8 +130,11 @@ public class SpongeBlock extends Block {
|
|
// NOP
|
|
} else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) {
|
|
BlockEntity tileentity = iblockdata.hasBlockEntity() ? world.getBlockEntity(blockposition2) : null;
|
|
-
|
|
- dropResources(iblockdata, world, blockposition2, tileentity);
|
|
+ // Paper start
|
|
+ if (block.getHandle().getMaterial() == Material.AIR) {
|
|
+ dropResources(iblockdata, world, blockposition2, tileentity);
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
}
|
|
world.setBlock(blockposition2, block.getHandle(), block.getFlag());
|