From 3df2b9e2ab50430f7110e608a124b4f5770d74ad Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 9 Mar 2021 08:47:26 +1100 Subject: [PATCH] #590: Add spawn and transform reasons for piglin zombification. By: Nathat23 --- .../java/org/bukkit/event/entity/CreatureSpawnEvent.java | 4 ++++ .../java/org/bukkit/event/entity/EntityTransformEvent.java | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java index 12262679d3..7a447dac88 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java @@ -173,6 +173,10 @@ public class CreatureSpawnEvent extends EntitySpawnEvent { * When a bee is released from a beehive/bee nest */ BEEHIVE, + /** + * When a piglin is converted to a zombified piglib. + */ + PIGLIN_ZOMBIFIED, /** * When a creature is spawned by plugins */ diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityTransformEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityTransformEvent.java index 7d23333e71..76ad715961 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityTransformEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityTransformEvent.java @@ -89,7 +89,7 @@ public class EntityTransformEvent extends EntityEvent implements Cancellable { */ INFECTION, /** - * When a entity drowns in water and a new entity spawns. + * When an entity drowns in water and a new entity spawns. */ DROWNED, /** @@ -104,6 +104,10 @@ public class EntityTransformEvent extends EntityEvent implements Cancellable { * When a slime splits into multiple smaller slimes. */ SPLIT, + /** + * When a piglin converts to a zombified piglin. + */ + PIGLIN_ZOMBIFIED, /** * When reason is unknown. */