Paper/nms-patches/TileEntityBeehive.patch

24 Zeilen
1.2 KiB
Diff

--- a/net/minecraft/server/TileEntityBeehive.java
+++ b/net/minecraft/server/TileEntityBeehive.java
@@ -194,7 +194,7 @@
BlockPosition blockposition2 = this.getPosition();
this.world.playSound((EntityHuman) null, (double) blockposition2.getX(), (double) blockposition2.getY(), (double) blockposition2.getZ(), SoundEffects.BLOCK_BEEHIVE_EXIT, SoundCategory.BLOCKS, 1.0F, 1.0F);
- return this.world.addEntity(entity);
+ return this.world.addEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BEEHIVE); // CraftBukkit
}
} else {
return false;
@@ -221,6 +221,11 @@
if (this.a(iblockdata, nbttagcompound, (List) null, tileentitybeehive_releasestatus)) {
iterator.remove();
}
+ // CraftBukkit start
+ else {
+ tileentitybeehive_a.b = tileentitybeehive_a.c / 2; // Not strictly Vanilla behaviour in cases where bees cannot spawn but still reasonable
+ }
+ // CraftBukkit end
} else {
tileentitybeehive_a.b++;
}