Fix SpongeAbsortEvent handling

Only process drops when the block is actually going to be removed
This commit is contained in:
Shane Freeder 2018-11-10 05:15:21 +00:00
parent 2bbc6d09df
commit 52ea2a0cd9

View file

@ -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());