RemoveReason
Package: com.hypixel.hytale.component
public enum RemoveReasonIndicates why an entity is being removed from a Store. Passed to RefSystem.onEntityRemove() and HolderSystem.onEntityRemoved() so systems can distinguish between permanent deletion and temporary unloading.
Enum Constants
Section titled “Enum Constants”| Constant | Description |
|---|---|
REMOVE | The entity is being permanently removed (e.g., death, despawn, explicit deletion). The entity’s references are invalidated and it will not return. |
UNLOAD | The entity is being temporarily unloaded (e.g., chunk unload). It may be restored later via LOAD. Systems should preserve state rather than clean up. |
Related Types
Section titled “Related Types”- AddReason — the corresponding enum for entity addition
- Store —
removeEntity()accepts aRemoveReason - CommandBuffer —
removeEntity()andtryRemoveEntity()accept aRemoveReason
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.