PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockScaffolding.patch
CraftBukkit/Spigot b3a8254758 Update to Minecraft 1.17
By: md_5 <git@md-5.net>
2021-06-11 15:00:00 +10:00

11 lines
1 KiB
Diff

--- a/net/minecraft/world/level/block/BlockScaffolding.java
+++ b/net/minecraft/world/level/block/BlockScaffolding.java
@@ -96,7 +96,7 @@
int i = a((IBlockAccess) worldserver, blockposition);
IBlockData iblockdata1 = (IBlockData) ((IBlockData) iblockdata.set(BlockScaffolding.DISTANCE, i)).set(BlockScaffolding.BOTTOM, this.a(worldserver, blockposition, i));
- if ((Integer) iblockdata1.get(BlockScaffolding.DISTANCE) == 7) {
+ if ((Integer) iblockdata1.get(BlockScaffolding.DISTANCE) == 7 && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.AIR.getBlockData()).isCancelled()) { // CraftBukkit - BlockFadeEvent
if ((Integer) iblockdata.get(BlockScaffolding.DISTANCE) == 7) {
worldserver.addEntity(new EntityFallingBlock(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (IBlockData) iblockdata1.set(BlockScaffolding.WATERLOGGED, false)));
} else {