Skip to content

Resource

Package: com.hypixel.hytale.component

public interface Resource<ECS_TYPE> extends Cloneable

The 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.

  • ECS_TYPE — the store type parameter
Resource[] EMPTY_ARRAY = new Resource[0];

Shared empty array constant.

@Nullable
Resource<ECS_TYPE> clone();

Creates a deep copy of this resource. Returns null if the resource cannot be cloned.

  • 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.