aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/world/level/block/MultifaceSpreader.patch
blob: 216e14a222576870fce8ed26e25ce551b8b690bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--- 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
 
     }
 }