SPIGOT-7137: StructureGrowEvent isFromBonemeal and getPlayer have incorrect values
This commit is contained in:
parent
d45057c597
commit
8468e167ef
@ -21,15 +21,17 @@
|
||||
|
||||
protected BlockSapling(WorldGenTreeProvider worldgentreeprovider, BlockBase.Info blockbase_info) {
|
||||
super(blockbase_info);
|
||||
@@ -44,7 +52,30 @@
|
||||
@@ -44,7 +52,32 @@
|
||||
if ((Integer) iblockdata.getValue(BlockSapling.STAGE) == 0) {
|
||||
worldserver.setBlock(blockposition, (IBlockData) iblockdata.cycle(BlockSapling.STAGE), 4);
|
||||
} else {
|
||||
- this.treeGrower.growTree(worldserver, worldserver.getChunkSource().getGenerator(), blockposition, iblockdata, randomsource);
|
||||
+ // CraftBukkit start
|
||||
+ if (worldserver.captureTreeGeneration) {
|
||||
+ this.treeGrower.growTree(worldserver, worldserver.getChunkSource().getGenerator(), blockposition, iblockdata, randomsource);
|
||||
+ } else {
|
||||
+ worldserver.captureTreeGeneration = true;
|
||||
+ // CraftBukkit end
|
||||
this.treeGrower.growTree(worldserver, worldserver.getChunkSource().getGenerator(), blockposition, iblockdata, randomsource);
|
||||
+ // CraftBukkit start
|
||||
+ this.treeGrower.growTree(worldserver, worldserver.getChunkSource().getGenerator(), blockposition, iblockdata, randomsource);
|
||||
+ worldserver.captureTreeGeneration = false;
|
||||
+ if (worldserver.capturedBlockStates.size() > 0) {
|
||||
+ TreeType treeType = BlockSapling.treeType;
|
||||
@ -48,6 +50,7 @@
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user