mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-15 07:01:36 +08:00
24 lines
1.2 KiB
Diff
24 lines
1.2 KiB
Diff
--- a/net/minecraft/server/BlockDirtSnowSpreadable.java
|
|
+++ b/net/minecraft/server/BlockDirtSnowSpreadable.java
|
|
@@ -23,6 +23,11 @@
|
|
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
|
if (!world.isClientSide) {
|
|
if (!a((IWorldReader) world, blockposition)) {
|
|
+ // CraftBukkit start
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, blockposition, Blocks.DIRT.getBlockData()).isCancelled()) {
|
|
+ return;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
world.setTypeUpdate(blockposition, Blocks.DIRT.getBlockData());
|
|
} else {
|
|
if (world.getLightLevel(blockposition.up()) >= 9) {
|
|
@@ -34,7 +39,7 @@
|
|
}
|
|
|
|
if (world.getType(blockposition1).getBlock() == Blocks.DIRT && b(world, blockposition1)) {
|
|
- world.setTypeUpdate(blockposition1, this.getBlockData());
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, blockposition, blockposition1, this.getBlockData()); // CraftBukkit
|
|
}
|
|
}
|
|
}
|