summaryrefslogtreecommitdiffstats
path: root/nms-patches/PathfinderGoalMakeLove.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/PathfinderGoalMakeLove.patch')
-rw-r--r--nms-patches/PathfinderGoalMakeLove.patch14
1 files changed, 13 insertions, 1 deletions
diff --git a/nms-patches/PathfinderGoalMakeLove.patch b/nms-patches/PathfinderGoalMakeLove.patch
index 400761c0..d7269cd0 100644
--- a/nms-patches/PathfinderGoalMakeLove.patch
+++ b/nms-patches/PathfinderGoalMakeLove.patch
@@ -1,6 +1,18 @@
--- a/net/minecraft/server/PathfinderGoalMakeLove.java
+++ b/net/minecraft/server/PathfinderGoalMakeLove.java
-@@ -87,7 +87,7 @@
+@@ -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 @@
this.b.s(false);
entityvillager.setAgeRaw(-24000);
entityvillager.setPositionRotation(this.b.locX, this.b.locY, this.b.locZ, 0.0F, 0.0F);