mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-07 16:57:42 +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
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
if (!fluid.is(FluidTags.WATER)) {
|
if (!fluid.is(FluidTags.WATER)) {
|
||||||
return BlockPos.TraversalNodeStatus.SKIP;
|
return BlockPos.TraversalNodeStatus.SKIP;
|
||||||
@@ -78,27 +88,64 @@
|
@@ -78,27 +88,68 @@
|
||||||
if (block instanceof BucketPickup) {
|
if (block instanceof BucketPickup) {
|
||||||
BucketPickup ifluidsource = (BucketPickup) block;
|
BucketPickup ifluidsource = (BucketPickup) block;
|
||||||
|
|
||||||
@ -96,8 +96,12 @@
|
|||||||
+ } else if (iblockdata.is(Blocks.KELP) || iblockdata.is(Blocks.KELP_PLANT) || iblockdata.is(Blocks.SEAGRASS) || iblockdata.is(Blocks.TALL_SEAGRASS)) {
|
+ } 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;
|
+ BlockEntity tileentity = iblockdata.hasBlockEntity() ? world.getBlockEntity(blockposition1) : null;
|
||||||
+
|
+
|
||||||
|
+ // Paper start - Fix SpongeAbsortEvent handling
|
||||||
|
+ if (block.getHandle().isAir()) {
|
||||||
+ dropResources(iblockdata, world, blockposition1, tileentity);
|
+ dropResources(iblockdata, world, blockposition1, tileentity);
|
||||||
+ }
|
+ }
|
||||||
|
+ // Paper end - Fix SpongeAbsortEvent handling
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ world.setBlock(blockposition1, block.getHandle(), block.getFlag());
|
+ world.setBlock(blockposition1, block.getHandle(), block.getFlag());
|
||||||
+ }
|
+ }
|
||||||
|
Loading…
Reference in New Issue
Block a user