9
9
import net .minecraft .core .Direction ;
10
10
import net .minecraft .server .level .ServerLevel ;
11
11
import net .minecraft .world .level .block .Block ;
12
+ import net .minecraft .world .level .redstone .Orientation ;
13
+ import org .jetbrains .annotations .Nullable ;
12
14
import org .spongepowered .asm .mixin .Mixin ;
13
15
import org .spongepowered .asm .mixin .injection .At ;
14
16
import org .spongepowered .asm .mixin .injection .Inject ;
@@ -30,16 +32,16 @@ public void updateNeighborsAlways(BlockPos pos, Block block, CallbackInfo callba
30
32
}
31
33
32
34
@ Inject (method = "updateNeighborsAtExceptFromFacing" , at = @ At (value = "TAIL" ))
33
- public void updateNeighborsExcept (BlockPos pos , Block sourceBlock , Direction direction , CallbackInfo callbackInfo ){
35
+ public void updateNeighborsExcept (BlockPos blockPos , Block block , Direction direction , @ Nullable Orientation orientation , CallbackInfo callbackInfo ){
34
36
//noinspection ConstantConditions
35
37
var serverLevel = (ServerLevel ) (Object ) this ;
36
38
var directions = EnumSet .allOf (Direction .class );
37
39
directions .remove (direction );
38
40
39
41
FallingTree .getMod ().getLeafBreakingHandler ().onBlockUpdate (
40
42
new ServerLevelWrapper (serverLevel ),
41
- new BlockPosWrapper (pos ),
42
- new BlockStateWrapper (serverLevel .getBlockState (pos )),
43
+ new BlockPosWrapper (blockPos ),
44
+ new BlockStateWrapper (serverLevel .getBlockState (blockPos )),
43
45
directions .stream ().map (FallingTree .getMod ()::asDirectionCompat ).collect (Collectors .toSet ()));
44
46
}
45
47
}
0 commit comments