--- a/net/minecraft/world/level/block/MultifaceBlock.java +++ b/net/minecraft/world/level/block/MultifaceBlock.java @@ -133,7 +133,7 @@ return (IBlockData) Arrays.stream(blockactioncontext.getNearestLookingDirections()).map((enumdirection) -> { return this.getStateForPlacement(iblockdata, world, blockposition, enumdirection); - }).filter(Objects::nonNull).findFirst().orElse((Object) null); + }).filter(Objects::nonNull).findFirst().orElse(null); // CraftBukkit - decompile error } @Nullable @@ -225,7 +225,7 @@ if (optional.isPresent()) { Pair pair = (Pair) optional.get(); - return this.spreadToFace(generatoraccess, (BlockPosition) pair.getFirst(), (EnumDirection) pair.getSecond(), flag); + return this.spreadToFace(generatoraccess, (BlockPosition) pair.getFirst(), (EnumDirection) pair.getSecond(), flag, blockposition); // CraftBukkit } else { return false; } @@ -270,7 +270,7 @@ } } - private boolean spreadToFace(GeneratorAccess generatoraccess, BlockPosition blockposition, EnumDirection enumdirection, boolean flag) { + private boolean spreadToFace(GeneratorAccess generatoraccess, BlockPosition blockposition, EnumDirection enumdirection, boolean flag, BlockPosition source) { // CraftBukkit IBlockData iblockdata = generatoraccess.getBlockState(blockposition); IBlockData iblockdata1 = this.getStateForPlacement(iblockdata, generatoraccess, blockposition, enumdirection); @@ -279,7 +279,7 @@ generatoraccess.getChunk(blockposition).markPosForPostprocessing(blockposition); } - return generatoraccess.setBlock(blockposition, iblockdata1, 2); + return org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(generatoraccess, source, blockposition, iblockdata1, 2); // CraftBukkit } else { return false; }