Fix ThrownEggHatchEvent#setHatching (#9448)
This commit is contained in:
@@ -17,7 +17,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ com.destroystokyo.paper.event.entity.ThrownEggHatchEvent event = new com.destroystokyo.paper.event.entity.ThrownEggHatchEvent((org.bukkit.entity.Egg) getBukkitEntity(), hatching, b0, hatchingType);
|
+ com.destroystokyo.paper.event.entity.ThrownEggHatchEvent event = new com.destroystokyo.paper.event.entity.ThrownEggHatchEvent((org.bukkit.entity.Egg) getBukkitEntity(), hatching, b0, hatchingType);
|
||||||
+ event.callEvent();
|
+ 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();
|
+ hatchingType = event.getHatchingType();
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user