PaperMC/patches/server/0282-Fix-SpongeAbsortEvent-handling.patch
Nassim Jahnke 928bcc8d3a
Updated Upstream (Bukkit/CraftBukkit) (#8430)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
09943450 Update SnakeYAML version
5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc
6f82b381 PR-788: Add getHand() to all relevant events

CraftBukkit Changes:
aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe
5329dd6fd PR-1107: Add getHand() to all relevant events
93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
2022-10-02 09:56:36 +02:00

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 8fe119f1ce36ce9ee63a1ba32df0ae8645b6a669..7304b2659eb45bc4bc9fa7c43e6ca07221d0fc73 100644
--- a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
@@ -129,8 +129,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());