public static enum Entity.RemovalReason extends Enum<Entity.RemovalReason>
| Enum Constant and Description |
|---|
CHANGED_DIMENSION
The entity changed dimension.
|
DISCARDED |
KILLED
The entity is killed.
|
UNLOADED_TO_CHUNK
The entity is unloaded to chunk.
|
UNLOADED_WITH_PLAYER |
| Modifier and Type | Field and Description |
|---|---|
private boolean |
destroy |
private boolean |
save |
| Modifier and Type | Method and Description |
|---|---|
boolean |
shouldDestroy()
Returns whether the entity should be destroyed or not.
|
boolean |
shouldSave()
Returns whether the entity should be saved or not.
|
static Entity.RemovalReason |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Entity.RemovalReason[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Entity.RemovalReason KILLED
public static final Entity.RemovalReason DISCARDED
public static final Entity.RemovalReason UNLOADED_TO_CHUNK
The entity should be saved.
public static final Entity.RemovalReason UNLOADED_WITH_PLAYER
public static final Entity.RemovalReason CHANGED_DIMENSION
public static Entity.RemovalReason[] values()
for (Entity.RemovalReason c : Entity.RemovalReason.values()) System.out.println(c);
public static Entity.RemovalReason valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean shouldDestroy()
If an entity should be destroyed, then the entity should not be re-used and any external data on the entity will be cleared.
public boolean shouldSave()