--- a/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java +++ b/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java @@ -41,6 +41,11 @@ @Override public void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if (!canBeGrass(iblockdata, worldserver, blockposition)) { + // CraftBukkit start + if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.DIRT.defaultBlockState()).isCancelled()) { + return; + } + // CraftBukkit end worldserver.setBlockAndUpdate(blockposition, Blocks.DIRT.defaultBlockState()); } else { if (worldserver.getMaxLocalRawBrightness(blockposition.above()) >= 9) { @@ -50,7 +55,7 @@ BlockPosition blockposition1 = blockposition.offset(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1); if (worldserver.getBlockState(blockposition1).is(Blocks.DIRT) && canPropagate(iblockdata1, worldserver, blockposition1)) { - worldserver.setBlockAndUpdate(blockposition1, (IBlockData) iblockdata1.setValue(BlockDirtSnowSpreadable.SNOWY, worldserver.getBlockState(blockposition1.above()).is(Blocks.SNOW))); + org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, (IBlockData) iblockdata1.setValue(BlockDirtSnowSpreadable.SNOWY, worldserver.getBlockState(blockposition1.above()).is(Blocks.SNOW))); // CraftBukkit } } }