Fix more diffs in block package

This commit is contained in:
Nassim Jahnke 2024-12-18 13:24:47 +01:00
parent 71bcc8c845
commit dedc6b3394
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
2 changed files with 7 additions and 5 deletions

View File

@ -41,10 +41,11 @@
}
}
@@ -173,13 +_,21 @@
@@ -172,14 +_,20 @@
BlockPos blockPos = pos.relative(direction.getOpposite());
if (level.getFluidState(blockPos).is(FluidTags.WATER)) {
Block block = level.getFluidState(pos).isSource() ? Blocks.OBSIDIAN : Blocks.COBBLESTONE;
level.setBlockAndUpdate(pos, block.defaultBlockState());
- level.setBlockAndUpdate(pos, block.defaultBlockState());
- this.fizz(level, pos);
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(level, pos, block.defaultBlockState())) {
@ -55,7 +56,7 @@
}
if (isSoulSoil && level.getBlockState(blockPos).is(Blocks.BLUE_ICE)) {
level.setBlockAndUpdate(pos, Blocks.BASALT.defaultBlockState());
- level.setBlockAndUpdate(pos, Blocks.BASALT.defaultBlockState());
- this.fizz(level, pos);
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(level, pos, Blocks.BASALT.defaultBlockState())) {

View File

@ -17,10 +17,11 @@
BlockState blockState = level.getBlockState(pos);
TagKey<Block> tagKey = spreader.replaceableBlocks();
@@ -108,6 +_,11 @@
@@ -107,7 +_,11 @@
BlockState blockState1 = level.getBlockState(blockPos);
if (blockState1.is(tagKey)) {
BlockState blockState2 = Blocks.SCULK.defaultBlockState();
level.setBlock(blockPos, blockState2, 3);
- level.setBlock(blockPos, blockState2, 3);
+ // CraftBukkit start - Call BlockSpreadEvent
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, sourceBlock, blockPos, blockState2, 3)) {
+ return false;