Paper/paper-server/nms-patches/BlockSnow.patch
CraftBukkit/Spigot 0e142c7f03 Update to Minecraft 1.15
By: md_5 <git@md-5.net>
2019-12-11 09:00:00 +11:00

15 lines
702 B
Diff

--- a/net/minecraft/server/BlockSnow.java
+++ b/net/minecraft/server/BlockSnow.java
@@ -58,6 +58,11 @@
@Override
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
if (worldserver.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 11) {
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.AIR.getBlockData()).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
c(iblockdata, (World) worldserver, blockposition);
worldserver.a(blockposition, false);
}