mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
SPIGOT-3105: BlockFadeEvent for large snow blocks
By: md_5 <git@md-5.net>
This commit is contained in:
parent
0e4ffd62e1
commit
3de67df146
1 changed files with 14 additions and 0 deletions
14
paper-server/nms-patches/BlockSnowBlock.patch
Normal file
14
paper-server/nms-patches/BlockSnowBlock.patch
Normal file
|
@ -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);
|
||||
}
|
Loading…
Reference in a new issue