summaryrefslogtreecommitdiffstats
path: root/nms-patches/Village.patch
blob: bb8a0c6f71b455844eb25a5ad1d683c0bb08d751 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/net/minecraft/server/Village.java
+++ b/net/minecraft/server/Village.java
@@ -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)) {
-                EntityIronGolem entityirongolem = (EntityIronGolem) EntityTypes.IRON_GOLEM.b(this.a, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition1, false, false);
+                EntityIronGolem entityirongolem = (EntityIronGolem) EntityTypes.IRON_GOLEM.spawnCreature(this.a, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition1, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE); // CraftBukkit
 
                 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;
                     }