Add some missing CreatureSpawnEvent.SpawnReason calls

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-11-14 14:17:25 +11:00
parent 6fd5f1379b
commit d625045ee2
3 changed files with 14 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/Village.java
+++ b/net/minecraft/server/Village.java
@@ -73,7 +73,7 @@
@@ -73,11 +73,11 @@
BlockPosition blockposition1 = blockposition.a(this.a.random.nextInt(16) - 8, this.a.random.nextInt(6) - 3, this.a.random.nextInt(16) - 8);
if (this.a(blockposition1)) {
@@ -9,3 +9,8 @@
if (entityirongolem != null) {
if (entityirongolem.a((GeneratorAccess) this.a, false) && entityirongolem.a((IWorldReader) this.a)) {
- this.a.addEntity(entityirongolem);
+ this.a.addEntity(entityirongolem, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE); // CraftBukkit
return entityirongolem;
}