mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 06:50:12 +01:00
SPIGOT-5464: Add BEEHIVE SpawnReason for when a bee leaves a beehive
This commit is contained in:
parent
d31f05fbc6
commit
4499fec567
1 changed files with 11 additions and 0 deletions
11
nms-patches/TileEntityBeehive.patch
Normal file
11
nms-patches/TileEntityBeehive.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- 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;
|
Loading…
Reference in a new issue