PaperMC/nms-patches/BlockSnowBlock.patch

15 lines
652 B
Diff
Raw Normal View History

--- a/net/minecraft/server/BlockSnowBlock.java
+++ b/net/minecraft/server/BlockSnowBlock.java
2018-07-15 02:00:00 +02:00
@@ -18,6 +18,11 @@
2018-07-15 02:00:00 +02:00
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
if (world.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 11) {
+ // CraftBukkit start
2018-07-15 02:00:00 +02:00
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, blockposition, Blocks.AIR.getBlockData()).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
2018-07-15 02:00:00 +02:00
iblockdata.a(world, blockposition, 0);
world.setAir(blockposition);
}