mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 06:24:06 +01:00
57dd397155
Upstream has released updates that appears 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: b999860d SPIGOT-2304: Add LootGenerateEvent CraftBukkit Changes:77fd87e4
SPIGOT-2304: Implement LootGenerateEventa1a705ee
SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent41712edd
SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
42 lines
2.2 KiB
Diff
42 lines
2.2 KiB
Diff
From 3dfa21fff39c7ccf8cd6d213d1a2e0611209ed21 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/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
|
index b9b750c369..540fcce1dd 100644
|
|
--- a/src/main/java/net/minecraft/server/Block.java
|
|
+++ b/src/main/java/net/minecraft/server/Block.java
|
|
@@ -472,7 +472,7 @@ public class Block implements IMaterial {
|
|
|
|
iblockdata.dropNaturally(world, blockposition, ItemStack.a);
|
|
}
|
|
-
|
|
+ public static void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, @Nullable TileEntity tileentity) { a(iblockdata, world, blockposition, tileentity); }
|
|
public static void a(IBlockData iblockdata, World world, BlockPosition blockposition, @Nullable TileEntity tileentity) {
|
|
if (world instanceof WorldServer) {
|
|
a(iblockdata, (WorldServer) world, blockposition, tileentity).forEach((itemstack) -> {
|
|
diff --git a/src/main/java/net/minecraft/server/BlockSponge.java b/src/main/java/net/minecraft/server/BlockSponge.java
|
|
index 685a30f3f1..9edf937a65 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockSponge.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockSponge.java
|
|
@@ -115,8 +115,11 @@ public class BlockSponge extends Block {
|
|
// NOP
|
|
} else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) {
|
|
TileEntity tileentity = iblockdata.getBlock().isTileEntity() ? world.getTileEntity(blockposition2) : null;
|
|
-
|
|
- a(iblockdata, world, blockposition2, tileentity);
|
|
+ // Paper start
|
|
+ if (block.getHandle().getMaterial() == Material.AIR) {
|
|
+ dropNaturally(iblockdata, world, blockposition2, tileentity);
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
}
|
|
world.setTypeAndData(blockposition2, block.getHandle(), block.getFlag());
|
|
--
|
|
2.26.2
|
|
|