Package org.bukkit.event.entity

# Enum Class EntityTransformEvent.TransformReason

java.lang.Object
java.lang.Enum<EntityTransformEvent.TransformReason>
org.bukkit.event.entity.EntityTransformEvent.TransformReason

All Implemented Interfaces:
  `Serializable`, `Comparable<EntityTransformEvent.TransformReason>`, `Constable`

Enclosing class:
  EntityTransformEvent

public static enum EntityTransformEvent.TransformReason extends Enum<EntityTransformEvent.TransformReason>

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`CURED`
When a zombie gets cured and a villager is spawned.
`DROWNED`
When an entity drowns in water and a new entity spawns.
`FROZEN`
When an entity is shaking in Powder Snow and a new entity spawns.
`INFECTION`
When a villager gets infected and a zombie villager spawns.
`LIGHTNING`
When lightning strikes a entity.
`METAMORPHOSIS`
When a tadpole converts to a frog
`PIGLIN_ZOMBIFIED`
When a piglin converts to a zombified piglin.
`SHEARED`
When a mooshroom (or MUSHROOM_COW) is sheared and a cow spawns.
`SPLIT`
When a slime splits into multiple smaller slimes.
`UNKNOWN`
When reason is unknown.

## Method Summary

Modifier and Type
Method
Description
`static EntityTransformEvent.TransformReason`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static EntityTransformEvent.TransformReason[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### CURED

public static final EntityTransformEvent.TransformReason CURED
When a zombie gets cured and a villager is spawned.

### FROZEN

public static final EntityTransformEvent.TransformReason FROZEN
When an entity is shaking in Powder Snow and a new entity spawns.

### INFECTION

public static final EntityTransformEvent.TransformReason INFECTION
When a villager gets infected and a zombie villager spawns.

### DROWNED

public static final EntityTransformEvent.TransformReason DROWNED
When an entity drowns in water and a new entity spawns.

### SHEARED

public static final EntityTransformEvent.TransformReason SHEARED
When a mooshroom (or MUSHROOM_COW) is sheared and a cow spawns.

### LIGHTNING

public static final EntityTransformEvent.TransformReason LIGHTNING
When lightning strikes a entity.

### SPLIT

public static final EntityTransformEvent.TransformReason SPLIT
When a slime splits into multiple smaller slimes.

### PIGLIN_ZOMBIFIED

public static final EntityTransformEvent.TransformReason PIGLIN_ZOMBIFIED
When a piglin converts to a zombified piglin.

### METAMORPHOSIS

public static final EntityTransformEvent.TransformReason METAMORPHOSIS
When a tadpole converts to a frog

### UNKNOWN

public static final EntityTransformEvent.TransformReason UNKNOWN
When reason is unknown.

## Method Details

### values

public static EntityTransformEvent.TransformReason[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Returns:
  an array containing the constants of this enum class, in the order they are declared

### valueOf

public static EntityTransformEvent.TransformReason valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum class has no constant with the specified name
  `NullPointerException` - if the argument is null