From 8ef7afef65df01912503dd31f2aef154bbbac60f Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sat, 19 Aug 2023 09:43:27 +1000 Subject: [PATCH] #1240: Call BlockGrowEvent for vines that are growing on additional sides of an existing vine block --- .../minecraft/world/level/block/BlockVine.patch | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/nms-patches/net/minecraft/world/level/block/BlockVine.patch b/nms-patches/net/minecraft/world/level/block/BlockVine.patch index fca8a413b..9cc7f4f14 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockVine.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockVine.patch @@ -9,7 +9,7 @@ public class BlockVine extends Block { public static final BlockStateBoolean UP = BlockSprawling.UP; -@@ -196,20 +198,24 @@ +@@ -196,30 +198,34 @@ BlockPosition blockposition3 = blockposition2.relative(enumdirection1); BlockPosition blockposition4 = blockposition2.relative(enumdirection2); @@ -38,7 +38,19 @@ + // CraftBukkit end } } else if (isAcceptableNeighbour(worldserver, blockposition2, enumdirection)) { - worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(getPropertyForFace(enumdirection), true), 2); +- worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(getPropertyForFace(enumdirection), true), 2); ++ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(getPropertyForFace(enumdirection), true), 2); // CraftBukkit + } + + } + } else { + if (enumdirection == EnumDirection.UP && blockposition.getY() < worldserver.getMaxBuildHeight() - 1) { + if (this.canSupportAtFace(worldserver, blockposition, enumdirection)) { +- worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockVine.UP, true), 2); ++ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(BlockVine.UP, true), 2); // CraftBukkit + return; + } + @@ -239,7 +245,7 @@ }