diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/MultifaceSpreader.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/MultifaceSpreader.java.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/MultifaceSpreader.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/MultifaceSpreader.java.patch new file mode 100644 index 0000000000..a2aa4aa01e --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/MultifaceSpreader.java.patch @@ -0,0 +1,45 @@ +--- a/net/minecraft/world/level/block/MultifaceSpreader.java ++++ b/net/minecraft/world/level/block/MultifaceSpreader.java +@@ -154,7 +156,7 @@ + level.getChunk(pos.pos()).markPosForPostprocessing(pos.pos()); + } + +- return level.setBlock(pos.pos(), stateForPlacement, 2); ++ return org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, pos.source(), pos.pos(), iblockdata1, 2); // CraftBukkit + } else { + return false; + } +@@ -172,23 +173,27 @@ + public static enum SpreadType { + SAME_POSITION { + @Override +- public MultifaceSpreader.SpreadPos getSpreadPos(BlockPos pos, Direction face, Direction spreadDirection) { +- return new MultifaceSpreader.SpreadPos(pos, face); ++ public MultifaceSpreader.c getSpreadPos(BlockPos pos, Direction face, Direction spreadDirection) { ++ return new MultifaceSpreader.c(pos, face, pos); // CraftBukkit + } + }, + SAME_PLANE { + @Override +- public MultifaceSpreader.SpreadPos getSpreadPos(BlockPos pos, Direction face, Direction spreadDirection) { +- return new MultifaceSpreader.SpreadPos(pos.relative(face), spreadDirection); ++ public MultifaceSpreader.c getSpreadPos(BlockPos pos, Direction face, Direction spreadDirection) { ++ return new MultifaceSpreader.c(pos.relative(face), spreadDirection, pos); // CraftBukkit + } + }, + WRAP_AROUND { + @Override +- public MultifaceSpreader.SpreadPos getSpreadPos(BlockPos pos, Direction face, Direction spreadDirection) { +- return new MultifaceSpreader.SpreadPos(pos.relative(face).relative(spreadDirection), face.getOpposite()); ++ public MultifaceSpreader.c getSpreadPos(BlockPos pos, Direction face, Direction spreadDirection) { ++ return new MultifaceSpreader.c(pos.relative(face).relative(spreadDirection), face.getOpposite(), pos); // CraftBukkit + } + }; + + public abstract MultifaceSpreader.SpreadPos getSpreadPos(BlockPos pos, Direction face, Direction spreadDirection); + } ++ ++ public static record c(BlockPos pos, Direction face, BlockPos source) { // CraftBukkit ++ ++ } + } |