Skip to content

AddReason

Package: com.hypixel.hytale.component

public enum AddReason

Indicates why an entity is being added to a Store. Passed to RefSystem.onEntityAdded() and HolderSystem.onEntityAdd() so systems can distinguish between newly created entities and entities restored from storage.

ConstantDescription
SPAWNThe entity is newly created at runtime (e.g., NPC spawn, player join).
LOADThe entity is being restored from persistent storage (e.g., chunk load, stored flock restore).
  • RemoveReason — the corresponding enum for entity removal
  • StoreaddEntity() accepts an AddReason
  • CommandBufferaddEntity() accepts an AddReason
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.