From 90df44b39aad18f40048ae57ca09b8063aed0615 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 20 Mar 2021 09:01:18 +1100 Subject: [PATCH] SPIGOT-6398: Fix crash when bonemealing bamboo and the BlockSpreadEvent is cancelled By: Brokkonaut --- .../net/minecraft/world/level/block/BlockBamboo.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/paper-server/nms-patches/net/minecraft/world/level/block/BlockBamboo.patch b/paper-server/nms-patches/net/minecraft/world/level/block/BlockBamboo.patch index 8df53fccd0..91236e15f2 100644 --- a/paper-server/nms-patches/net/minecraft/world/level/block/BlockBamboo.patch +++ b/paper-server/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);