1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-01-31 03:50:36 +01:00

Fix ThrownEggHatchEvent#setHatching ()

This commit is contained in:
Lulu13022002 2023-07-05 09:46:12 +02:00
parent c32c74f4ce
commit 493852bbd1

View file

@ -17,7 +17,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start
+ com.destroystokyo.paper.event.entity.ThrownEggHatchEvent event = new com.destroystokyo.paper.event.entity.ThrownEggHatchEvent((org.bukkit.entity.Egg) getBukkitEntity(), hatching, b0, hatchingType);
+ event.callEvent();
+ b0 = event.getNumHatches();
+ hatching = event.isHatching();
+ b0 = hatching ? event.getNumHatches() : 0; // If hatching is set to false, ensure child count is 0
+ hatchingType = event.getHatchingType();
+ // Paper end