Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/BlockDirtSnowSpreadable.patch

24 Zeilen
1.2 KiB
Diff

2018-07-15 02:00:00 +02:00
--- 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
}
}
}