SPIGOT-5537: Bee nests generated by growing trees near flower have no bees

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-01-28 09:48:28 +11:00
parent 37d58b321b
commit e0ee6f0a50
7 changed files with 99 additions and 72 deletions

View File

@@ -108,7 +108,7 @@
+ Location location = new Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ TreeType treeType = BlockSapling.treeType;
+ BlockSapling.treeType = null;
+ List<BlockState> blocks = (List<BlockState>) world.capturedBlockStates.clone();
+ List<BlockState> blocks = new java.util.ArrayList<>(world.capturedBlockStates.values());
+ world.capturedBlockStates.clear();
+ StructureGrowEvent structureEvent = null;
+ if (treeType != null) {
@@ -139,7 +139,7 @@
if (entityhuman != null && enuminteractionresult == EnumInteractionResult.SUCCESS) {
- entityhuman.b(StatisticList.ITEM_USED.b(item));
+ org.bukkit.event.block.BlockPlaceEvent placeEvent = null;
+ List<BlockState> blocks = (List<BlockState>) world.capturedBlockStates.clone();
+ List<BlockState> blocks = new java.util.ArrayList<>(world.capturedBlockStates.values());
+ world.capturedBlockStates.clear();
+ if (blocks.size() > 1) {
+ placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, enumhand, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ());