From 3de67df1464dabc9a5afc5d6e06d6da13a6a41d6 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 8 Mar 2017 14:24:11 +1100 Subject: [PATCH] SPIGOT-3105: BlockFadeEvent for large snow blocks By: md_5 --- paper-server/nms-patches/BlockSnowBlock.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 paper-server/nms-patches/BlockSnowBlock.patch diff --git a/paper-server/nms-patches/BlockSnowBlock.patch b/paper-server/nms-patches/BlockSnowBlock.patch new file mode 100644 index 0000000000..532914933e --- /dev/null +++ b/paper-server/nms-patches/BlockSnowBlock.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/server/BlockSnowBlock.java ++++ b/net/minecraft/server/BlockSnowBlock.java +@@ -20,6 +20,11 @@ + + public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { + if (world.getBrightness(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); + }