Add sniffer egg api (#9288)

This commit is contained in:
Lulu13022002
2023-08-26 22:12:46 +02:00
parent 7e896541bd
commit d0bce54059
8 changed files with 135 additions and 21 deletions

View File

@@ -65,9 +65,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
entityitem.setDefaultPickUpDelay();
- this.finalizeSpawnChildFromBreeding(world, other, (AgeableMob) null);
+ this.finalizeSpawnChildFromBreeding(world, other, (AgeableMob) null, result.getExperience()); // Paper - Add EntityFertilizeEggEvent event
if (this.spawnAtLocation(entityitem) != null) { // Paper - call EntityDropItemEvent
this.playSound(SoundEvents.SNIFFER_EGG_PLOP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 0.5F);
world.addFreshEntity(entityitem);
}
} // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java