3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

SPIGOT-3105: BlockFadeEvent for large snow blocks

Dieser Commit ist enthalten in:
md_5 2017-03-08 14:24:11 +11:00
Ursprung cb61ac0404
Commit cb44e932be

Datei anzeigen

@ -0,0 +1,14 @@
--- a/net/minecraft/server/BlockSnowBlock.java
+++ b/net/minecraft/server/BlockSnowBlock.java
@@ -20,6 +20,11 @@
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
if (world.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 11) {
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), Blocks.AIR).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
this.b(world, blockposition, world.getType(blockposition), 0);
world.setAir(blockposition);
}