3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00

Fix duplicate iron golem add

Dieser Commit ist enthalten in:
md_5 2019-01-11 12:37:43 +11:00
Ursprung 843cee65f3
Commit 98b862ad88

Datei anzeigen

@ -1,11 +1,6 @@
--- a/net/minecraft/server/Village.java --- a/net/minecraft/server/Village.java
+++ b/net/minecraft/server/Village.java +++ b/net/minecraft/server/Village.java
@@ -73,11 +73,11 @@ @@ -77,7 +77,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 != null) {
if (entityirongolem.a((GeneratorAccess) this.a, false) && entityirongolem.a((IWorldReader) this.a)) { if (entityirongolem.a((GeneratorAccess) this.a, false) && entityirongolem.a((IWorldReader) this.a)) {