mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
SPIGOT-6398: Fix crash when bonemealing bamboo and the BlockSpreadEvent is cancelled
By: Brokkonaut <hannos17@gmx.de>
This commit is contained in:
parent
cdb7cb852f
commit
90df44b39a
1 changed files with 9 additions and 0 deletions
|
@ -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…
Reference in a new issue