Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

RemovalReason

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.entity.RemovalReason;

Implements

Undocumented Interfaces

Comparable<Enum>

Enum Constants

RemovalReason is an enum with 5 constants. They are accessible like so:

script.zs
// RemovalReason.CHANGED_DIMENSION
<constant:minecraft:entity/removalreason:changed_dimension>
// RemovalReason.DISCARDED
<constant:minecraft:entity/removalreason:discarded>
// RemovalReason.KILLED
<constant:minecraft:entity/removalreason:killed>
// RemovalReason.UNLOADED_TO_CHUNK
<constant:minecraft:entity/removalreason:unloaded_to_chunk>
// RemovalReason.UNLOADED_WITH_PLAYER
<constant:minecraft:entity/removalreason:unloaded_with_player>

Members

Getter
script.zs
// RemovalReason.shouldDestroy as bool
<constant:minecraft:entity/removalreason:changed_dimension>.shouldDestroy

Return Type: bool

shouldDestroy() as bool
script.zs
// RemovalReason.shouldDestroy() as bool;
<constant:minecraft:entity/removalreason:changed_dimension>.shouldDestroy();

Return Type: bool