PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/SculkVeinBlock.patch
CraftBukkit/Spigot 52f9281656 #1065: Add missing calls for BlockSpreadEvent when Sculk spreads
By: Brokkonaut <hannos17@gmx.de>
2022-06-11 13:20:38 +10:00

15 lines
1 KiB
Diff

--- a/net/minecraft/world/level/block/SculkVeinBlock.java
+++ b/net/minecraft/world/level/block/SculkVeinBlock.java
@@ -121,7 +121,11 @@
if (iblockdata1.is(tagkey)) {
IBlockData iblockdata2 = Blocks.SCULK.defaultBlockState();
- generatoraccess.setBlock(blockposition1, iblockdata2, 3);
+ // CraftBukkit start - Call BlockSpreadEvent
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(generatoraccess, blockposition, blockposition1, iblockdata2, 3)) {
+ return false;
+ }
+ // CraftBukkit end
Block.pushEntitiesUp(iblockdata1, iblockdata2, generatoraccess, blockposition1);
generatoraccess.playSound((EntityHuman) null, blockposition1, SoundEffects.SCULK_BLOCK_SPREAD, SoundCategory.BLOCKS, 1.0F, 1.0F);
this.veinSpreader.spreadAll(iblockdata2, generatoraccess, blockposition1, sculkspreader.isWorldGeneration());