Commits

md_5 authored 062680a8264
SPIGOT-5467: Calm down bees that cannot exit hive
No tags

nms-patches/TileEntityBeehive.patch

Modified
1 1 --- a/net/minecraft/server/TileEntityBeehive.java
2 2 +++ b/net/minecraft/server/TileEntityBeehive.java
3 3 @@ -194,7 +194,7 @@
4 4 BlockPosition blockposition2 = this.getPosition();
5 5
6 6 this.world.playSound((EntityHuman) null, (double) blockposition2.getX(), (double) blockposition2.getY(), (double) blockposition2.getZ(), SoundEffects.BLOCK_BEEHIVE_EXIT, SoundCategory.BLOCKS, 1.0F, 1.0F);
7 7 - return this.world.addEntity(entity);
8 8 + return this.world.addEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BEEHIVE); // CraftBukkit
9 9 }
10 10 } else {
11 11 return false;
12 +@@ -221,6 +221,11 @@
13 + if (this.a(iblockdata, nbttagcompound, (List) null, tileentitybeehive_releasestatus)) {
14 + iterator.remove();
15 + }
16 ++ // CraftBukkit start
17 ++ else {
18 ++ tileentitybeehive_a.b = tileentitybeehive_a.c / 2; // Not strictly Vanilla behaviour in cases where bees cannot spawn but still reasonable
19 ++ }
20 ++ // CraftBukkit end
21 + } else {
22 + tileentitybeehive_a.b++;
23 + }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut