SPIGOT-7095: StructureGrowEvent doesn't fire for mangrove propagules growing to a tree
This commit is contained in:
parent
163e35c91b
commit
7ba06e15b7
@ -21,14 +21,14 @@
|
|||||||
|
|
||||||
protected BlockSapling(WorldGenTreeProvider worldgentreeprovider, BlockBase.Info blockbase_info) {
|
protected BlockSapling(WorldGenTreeProvider worldgentreeprovider, BlockBase.Info blockbase_info) {
|
||||||
super(blockbase_info);
|
super(blockbase_info);
|
||||||
@@ -35,7 +43,30 @@
|
@@ -44,7 +52,30 @@
|
||||||
@Override
|
if ((Integer) iblockdata.getValue(BlockSapling.STAGE) == 0) {
|
||||||
public void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
|
worldserver.setBlock(blockposition, (IBlockData) iblockdata.cycle(BlockSapling.STAGE), 4);
|
||||||
if (worldserver.getMaxLocalRawBrightness(blockposition.above()) >= 9 && randomsource.nextInt(7) == 0) {
|
} else {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ worldserver.captureTreeGeneration = true;
|
+ worldserver.captureTreeGeneration = true;
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
this.advanceTree(worldserver, blockposition, iblockdata, randomsource);
|
this.treeGrower.growTree(worldserver, worldserver.getChunkSource().getGenerator(), blockposition, iblockdata, randomsource);
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ worldserver.captureTreeGeneration = false;
|
+ worldserver.captureTreeGeneration = false;
|
||||||
+ if (worldserver.capturedBlockStates.size() > 0) {
|
+ if (worldserver.capturedBlockStates.size() > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user