mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
43702a9e10
By: md_5 <git@md-5.net>
38 lines
2 KiB
Diff
38 lines
2 KiB
Diff
--- 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<BlockPosition, EnumDirection> 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;
|
|
}
|