Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/PathfinderGoalMakeLove.patch

24 Zeilen
1002 B
Diff

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/PathfinderGoalMakeLove.java
+++ b/net/minecraft/server/PathfinderGoalMakeLove.java
2016-06-19 07:00:39 +02:00
@@ -80,6 +80,11 @@
private void i() {
EntityVillager entityvillager = this.b.b((EntityAgeable) this.c);
+ // CraftBukkit start - call EntityBreedEvent
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityvillager, this.b, this.c, null, null, 0).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
this.c.setAgeRaw(6000);
this.b.setAgeRaw(6000);
@@ -87,7 +92,7 @@
2016-06-09 03:43:49 +02:00
this.b.s(false);
entityvillager.setAgeRaw(-24000);
entityvillager.setPositionRotation(this.b.locX, this.b.locY, this.b.locZ, 0.0F, 0.0F);
- this.d.addEntity(entityvillager);
+ this.d.addEntity(entityvillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
this.d.broadcastEntityEffect(entityvillager, (byte) 12);
}
}