PaperMC/nms-patches/Village.patch
2018-07-15 10:00:00 +10:00

11 lines
943 B
Diff

--- a/net/minecraft/server/Village.java
+++ b/net/minecraft/server/Village.java
@@ -73,7 +73,7 @@
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.M() && entityirongolem.a((IWorldReader) this.a)) {