mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Fix SpongeAbsortEvent handling
Only process drops when the block is actually going to be removed
This commit is contained in:
parent
2bbc6d09df
commit
52ea2a0cd9
1 changed files with 5 additions and 1 deletions
|
@ -37,7 +37,7 @@
|
|||
|
||||
if (!fluid.is(FluidTags.WATER)) {
|
||||
return BlockPos.TraversalNodeStatus.SKIP;
|
||||
@@ -78,27 +88,64 @@
|
||||
@@ -78,27 +88,68 @@
|
||||
if (block instanceof BucketPickup) {
|
||||
BucketPickup ifluidsource = (BucketPickup) block;
|
||||
|
||||
|
@ -96,7 +96,11 @@
|
|||
+ } 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 - Fix SpongeAbsortEvent handling
|
||||
+ if (block.getHandle().isAir()) {
|
||||
+ dropResources(iblockdata, world, blockposition1, tileentity);
|
||||
+ }
|
||||
+ // Paper end - Fix SpongeAbsortEvent handling
|
||||
+ }
|
||||
+ }
|
||||
+ world.setBlock(blockposition1, block.getHandle(), block.getFlag());
|
||||
|
|
Loading…
Reference in a new issue