SPIGOT-6398: Fix crash when bonemealing bamboo and the BlockSpreadEvent is cancelled
This commit is contained in:
parent
9c32a8794c
commit
7eb35643e2
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user