Paper/paper-server/nms-patches/net/minecraft/world/level/block/BlockScaffolding.patch
CraftBukkit/Spigot 43702a9e10 Update to Minecraft 1.18-pre5
By: md_5 <git@md-5.net>
2021-11-22 09:00:00 +11:00

12 lines
1.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 = getDistance(worldserver, blockposition);
IBlockData iblockdata1 = (IBlockData) ((IBlockData) iblockdata.setValue(BlockScaffolding.DISTANCE, i)).setValue(BlockScaffolding.BOTTOM, this.isBottom(worldserver, blockposition, i));
- if ((Integer) iblockdata1.getValue(BlockScaffolding.DISTANCE) == 7) {
+ if ((Integer) iblockdata1.getValue(BlockScaffolding.DISTANCE) == 7 && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) { // CraftBukkit - BlockFadeEvent
if ((Integer) iblockdata.getValue(BlockScaffolding.DISTANCE) == 7) {
worldserver.addFreshEntity(new EntityFallingBlock(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (IBlockData) iblockdata1.setValue(BlockScaffolding.WATERLOGGED, false)));
} else {