Add sniffer egg api (#9288)
This commit is contained in:
parent
7e896541bd
commit
d0bce54059
8 changed files with 135 additions and 21 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue