SPIGOT-5255: Raid / patrol spawn reasons

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-09-07 16:35:09 +10:00
parent 5c6a8f66c2
commit c3c7488743
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
--- a/net/minecraft/server/MobSpawnerPatrol.java
+++ b/net/minecraft/server/MobSpawnerPatrol.java
@@ -96,7 +96,7 @@
entitymonsterpatrolling.setPosition((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ());
entitymonsterpatrolling.prepare(world, world.getDamageScaler(blockposition), EnumMobSpawn.PATROL, (GroupDataEntity) null, (NBTTagCompound) null);
- world.addEntity(entitymonsterpatrolling);
+ world.addEntity(entitymonsterpatrolling, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PATROL); // CraftBukkit
return true;
} else {
return false;