mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2024-11-22 10:06:16 +00:00
44 lines
2.4 KiB
Diff
44 lines
2.4 KiB
Diff
--- a/net/minecraft/world/level/block/MultifaceSpreader.java
|
|
+++ b/net/minecraft/world/level/block/MultifaceSpreader.java
|
|
@@ -156,7 +156,7 @@
|
|
generatoraccess.getChunk(multifacespreader_c.pos()).markPosForPostprocessing(multifacespreader_c.pos());
|
|
}
|
|
|
|
- return generatoraccess.setBlock(multifacespreader_c.pos(), iblockdata1, 2);
|
|
+ return org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(generatoraccess, multifacespreader_c.source(), multifacespreader_c.pos(), iblockdata1, 2); // CraftBukkit
|
|
} else {
|
|
return false;
|
|
}
|
|
@@ -174,19 +174,19 @@
|
|
SAME_POSITION {
|
|
@Override
|
|
public MultifaceSpreader.c getSpreadPos(BlockPosition blockposition, EnumDirection enumdirection, EnumDirection enumdirection1) {
|
|
- return new MultifaceSpreader.c(blockposition, enumdirection);
|
|
+ return new MultifaceSpreader.c(blockposition, enumdirection, blockposition); // CraftBukkit
|
|
}
|
|
},
|
|
SAME_PLANE {
|
|
@Override
|
|
public MultifaceSpreader.c getSpreadPos(BlockPosition blockposition, EnumDirection enumdirection, EnumDirection enumdirection1) {
|
|
- return new MultifaceSpreader.c(blockposition.relative(enumdirection), enumdirection1);
|
|
+ return new MultifaceSpreader.c(blockposition.relative(enumdirection), enumdirection1, blockposition); // CraftBukkit
|
|
}
|
|
},
|
|
WRAP_AROUND {
|
|
@Override
|
|
public MultifaceSpreader.c getSpreadPos(BlockPosition blockposition, EnumDirection enumdirection, EnumDirection enumdirection1) {
|
|
- return new MultifaceSpreader.c(blockposition.relative(enumdirection).relative(enumdirection1), enumdirection.getOpposite());
|
|
+ return new MultifaceSpreader.c(blockposition.relative(enumdirection).relative(enumdirection1), enumdirection.getOpposite(), blockposition); // CraftBukkit
|
|
}
|
|
};
|
|
|
|
@@ -195,7 +195,7 @@
|
|
public abstract MultifaceSpreader.c getSpreadPos(BlockPosition blockposition, EnumDirection enumdirection, EnumDirection enumdirection1);
|
|
}
|
|
|
|
- public static record c(BlockPosition pos, EnumDirection face) {
|
|
+ public static record c(BlockPosition pos, EnumDirection face, BlockPosition source) { // CraftBukkit
|
|
|
|
}
|
|
}
|