From 7eb35643e2ed2fb55732e2ef9e43087f91006fef Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sat, 20 Mar 2021 09:01:18 +1100 Subject: [PATCH] SPIGOT-6398: Fix crash when bonemealing bamboo and the BlockSpreadEvent is cancelled --- .../net/minecraft/world/level/block/BlockBamboo.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nms-patches/net/minecraft/world/level/block/BlockBamboo.patch b/nms-patches/net/minecraft/world/level/block/BlockBamboo.patch index 8df53fccd..91236e15f 100644 --- a/nms-patches/net/minecraft/world/level/block/BlockBamboo.patch +++ b/nms-patches/net/minecraft/world/level/block/BlockBamboo.patch @@ -1,5 +1,14 @@ --- a/net/minecraft/world/level/block/BlockBamboo.java +++ b/net/minecraft/world/level/block/BlockBamboo.java +@@ -174,7 +174,7 @@ + BlockPosition blockposition1 = blockposition.up(i); + IBlockData iblockdata1 = worldserver.getType(blockposition1); + +- if (k >= 16 || (Integer) iblockdata1.get(BlockBamboo.f) == 1 || !worldserver.isEmpty(blockposition1.up())) { ++ if (k >= 16 || !iblockdata1.a(Blocks.BAMBOO) || (Integer) iblockdata1.get(BlockBamboo.f) == 1 || !worldserver.isEmpty(blockposition1.up())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here + return; + } + @@ -195,14 +195,18 @@ BlockPosition blockposition1 = blockposition.down(2); IBlockData iblockdata2 = world.getType(blockposition1);