Resource
Package: com.hypixel.hytale.component
public interface Resource<ECS_TYPE> extends CloneableThe root interface for all ECS resources. Resources are per-Store singleton data — unlike Component which is per-entity, a resource exists once per store and is shared by all systems. Resources are registered via IComponentRegistry.registerResource() and accessed via ResourceType handles.
Resources are loaded and saved through IResourceStorage, enabling persistent store-level data.
Type Parameters
Section titled “Type Parameters”ECS_TYPE— the store type parameter
Fields
Section titled “Fields”Resource[] EMPTY_ARRAY = new Resource[0];Shared empty array constant.
Methods
Section titled “Methods”@NullableResource<ECS_TYPE> clone();Creates a deep copy of this resource. Returns null if the resource cannot be cloned.
Related Types
Section titled “Related Types”- ResourceType — typed handle for registering and accessing resources
- ResourceRegistration — registration record for a resource
- IResourceStorage — persistence interface for loading/saving resources
- Component — the per-entity equivalent
- Store — holds resource instances and provides access via
getResource()
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.