summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockSnow.patch
blob: 434eaed9123e6fa0c76aa5c7c71faf77c367c020 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- a/net/minecraft/server/BlockSnow.java
+++ b/net/minecraft/server/BlockSnow.java
@@ -82,6 +82,11 @@
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
         if (world.b(EnumSkyBlock.BLOCK, blockposition) > 11) {
+            // CraftBukkit start
+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), Blocks.AIR).isCancelled()) {
+                return;
+            }
+            // CraftBukkit end
             this.b(world, blockposition, world.getType(blockposition), 0);
             world.setAir(blockposition);
         }