diff options
Diffstat (limited to 'patches/server/0844-Add-EntityFertilizeEggEvent.patch')
-rw-r--r-- | patches/server/0844-Add-EntityFertilizeEggEvent.patch | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/patches/server/0844-Add-EntityFertilizeEggEvent.patch b/patches/server/0844-Add-EntityFertilizeEggEvent.patch index 1cd60bd301..975cf31634 100644 --- a/patches/server/0844-Add-EntityFertilizeEggEvent.patch +++ b/patches/server/0844-Add-EntityFertilizeEggEvent.patch @@ -29,19 +29,19 @@ index cfc0cee09dfd522409bb5853fc96528bd0137475..6a98f66b7701e8af389ca9a1e9eb230a } diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -index 90e4e0ec0c7b0ece23c4b53f5f12b1f24e1c18ad..295769d039f2a1e4f48912a60f9dbe267d8992c1 100644 +index 70bbc325e3a1f7f334a6d1024097800efa6bec03..a03fb7aa9f4528f4885db88eaf480202d5f54750 100644 --- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java +++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -@@ -239,7 +239,12 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> { +@@ -263,7 +263,12 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> { @Override public void spawnChildFromBreeding(ServerLevel world, Animal other) { -- this.finalizeSpawnChildFromBreeding(world, other, (AgeableMob)null); +- this.finalizeSpawnChildFromBreeding(world, other, null); + // Paper start - Add EntityFertilizeEggEvent event + final io.papermc.paper.event.entity.EntityFertilizeEggEvent result = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityFertilizeEggEvent(this, other); + if (result.isCancelled()) return; + -+ this.finalizeSpawnChildFromBreeding(world, other, (AgeableMob)null, result.getExperience()); // Paper - use craftbukkit call that takes experience amount ++ this.finalizeSpawnChildFromBreeding(world, other, null, result.getExperience()); // Paper - use craftbukkit call that takes experience amount + // Paper end - Add EntityFertilizeEggEvent event this.getBrain().setMemory(MemoryModuleType.IS_PREGNANT, Unit.INSTANCE); } |