PaperMC/nms-patches/BlockSnow.patch
2016-11-17 12:41:03 +11:00

14 lines
724 B
Diff

--- a/net/minecraft/server/BlockSnow.java
+++ b/net/minecraft/server/BlockSnow.java
@@ -81,6 +81,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);
}