PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockSnow.patch

15 lines
761 B
Diff
Raw Normal View History

2021-03-15 23:00:00 +01:00
--- a/net/minecraft/world/level/block/BlockSnow.java
+++ b/net/minecraft/world/level/block/BlockSnow.java
@@ -99,6 +99,11 @@
@Override
public void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
if (worldserver.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 11) {
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
dropResources(iblockdata, worldserver, blockposition);
worldserver.removeBlock(blockposition, false);
}