mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +01:00
SPIGOT-5395: Call BlockFadeEvent for Scaffolding
By: Brokkonaut <hannos17@gmx.de>
This commit is contained in:
parent
020f2f931d
commit
47d7b001aa
11
paper-server/nms-patches/BlockScaffolding.patch
Normal file
11
paper-server/nms-patches/BlockScaffolding.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/server/BlockScaffolding.java
|
||||
+++ b/net/minecraft/server/BlockScaffolding.java
|
||||
@@ -78,7 +78,7 @@
|
||||
int i = a((IBlockAccess) world, blockposition);
|
||||
IBlockData iblockdata1 = (IBlockData) ((IBlockData) iblockdata.set(BlockScaffolding.a, i)).set(BlockScaffolding.c, this.a(world, blockposition, i));
|
||||
|
||||
- if ((Integer) iblockdata1.get(BlockScaffolding.a) == 7) {
|
||||
+ if ((Integer) iblockdata1.get(BlockScaffolding.a) == 7 && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, blockposition, Blocks.AIR.getBlockData()).isCancelled()) { // CraftBukkit - BlockFadeEvent
|
||||
if ((Integer) iblockdata.get(BlockScaffolding.a) == 7) {
|
||||
world.addEntity(new EntityFallingBlock(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (IBlockData) iblockdata1.set(BlockScaffolding.b, false)));
|
||||
} else {
|
Loading…
Reference in New Issue
Block a user