Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- shutdown()
- registerComponent(Class, Supplier)
- registerComponent(Class, String, BuilderCodec)
- registerComponent(Class, String, BuilderCodec, boolean)
- registerResource(Class, Supplier)
- registerResource(Class, String, BuilderCodec)
- registerSpatialResource(Supplier)
- registerSystemType(Class)
- registerEntityEventType(Class)
- registerWorldEventType(Class)
- registerSystemGroup()
- registerSystem(ISystem)
- registerSystem(ISystem, boolean)
Class ComponentRegistryProxy<ECS_TYPE>
java.lang.Object
com.hypixel.hytale.component.ComponentRegistryProxy<ECS_TYPE>
- All Implemented Interfaces:
IComponentRegistry<ECS_TYPE>
public class ComponentRegistryProxy<ECS_TYPE>
extends Object
implements IComponentRegistry<ECS_TYPE>
-
Constructor Summary
ConstructorsConstructorDescriptionComponentRegistryProxy(List<BooleanConsumer> registrations, ComponentRegistry<ECS_TYPE> registry) -
Method Summary
Modifier and TypeMethodDescription<T extends Component<ECS_TYPE>>
ComponentType<ECS_TYPE, T> registerComponent(Class<? super T> tClass, String id, BuilderCodec<T> codec) Called to register a new component, providing the given class, id and codec.<T extends Component<ECS_TYPE>>
ComponentType<ECS_TYPE, T> registerComponent(Class<? super T> tClass, String id, BuilderCodec<T> codec, boolean skipValidation) Deprecated, for removal: This API element is subject to removal in a future version.<T extends Component<ECS_TYPE>>
ComponentType<ECS_TYPE, T> registerComponent(Class<? super T> tClass, Supplier<T> supplier) Called to register a new component, providing the given class and constructor supplier.<T extends EcsEvent>
EntityEventType<ECS_TYPE, T> registerEntityEventType(Class<? super T> eventTypeClass) Called to register a new entity event type, providing the given class.<T extends Resource<ECS_TYPE>>
ResourceType<ECS_TYPE, T> registerResource(Class<? super T> tClass, String id, BuilderCodec<T> codec) Called to register a new resource, providing the given class, id and codec.<T extends Resource<ECS_TYPE>>
ResourceType<ECS_TYPE, T> registerResource(Class<? super T> tClass, Supplier<T> supplier) Called to register a new resource, providing the given class and constructor supplier.registerSpatialResource(Supplier<SpatialStructure<Ref<ECS_TYPE>>> supplier) Registers a spatial resource with the given supplier for creating spatial structures.voidregisterSystem(ISystem<ECS_TYPE> system) Called to register a new system, providing the given system instance.voidregisterSystem(ISystem<ECS_TYPE> system, boolean bypassClassCheck) Deprecated, for removal: This API element is subject to removal in a future version.<T extends ISystem<ECS_TYPE>>
SystemType<ECS_TYPE, T> registerSystemType(Class<? super T> systemTypeClass) Called to register a new system type, providing the given class.<T extends EcsEvent>
WorldEventType<ECS_TYPE, T> registerWorldEventType(Class<? super T> eventTypeClass) Called to register a new world event type, providing the given class.voidshutdown()
-
Constructor Details
-
ComponentRegistryProxy
public ComponentRegistryProxy(List<BooleanConsumer> registrations, ComponentRegistry<ECS_TYPE> registry)
-
-
Method Details
-
shutdown
public void shutdown() -
registerComponent
@Nonnull public <T extends Component<ECS_TYPE>> ComponentType<ECS_TYPE,T> registerComponent(@Nonnull Class<? super T> tClass, @Nonnull Supplier<T> supplier) Description copied from interface:IComponentRegistryCalled to register a new component, providing the given class and constructor supplier.- Specified by:
registerComponentin interfaceIComponentRegistry<ECS_TYPE>- Type Parameters:
T- The type of the component.- Parameters:
tClass- The class of the component to register.supplier- The supplier to use to create new instances of the component.- Returns:
- The registered component type.
-
registerComponent
@Nonnull public <T extends Component<ECS_TYPE>> ComponentType<ECS_TYPE,T> registerComponent(@Nonnull Class<? super T> tClass, @Nonnull String id, @Nonnull BuilderCodec<T> codec) Description copied from interface:IComponentRegistryCalled to register a new component, providing the given class, id and codec.The codec allows for serialization and deserialization of the component, enabling it to be saved and loaded as needed.
- Specified by:
registerComponentin interfaceIComponentRegistry<ECS_TYPE>- Type Parameters:
T- The type of the component.- Parameters:
tClass- The class of the component to register.id- The unique identifier for the component.codec- The codec used for serialization and deserialization of the component.- Returns:
- The registered component type.
-
registerComponent
@Deprecated(forRemoval=true) @Nonnull public <T extends Component<ECS_TYPE>> ComponentType<ECS_TYPE,T> registerComponent(@Nonnull Class<? super T> tClass, @Nonnull String id, @Nonnull BuilderCodec<T> codec, boolean skipValidation) Deprecated, for removal: This API element is subject to removal in a future version. -
registerResource
@Nonnull public <T extends Resource<ECS_TYPE>> ResourceType<ECS_TYPE,T> registerResource(@Nonnull Class<? super T> tClass, @Nonnull Supplier<T> supplier) Description copied from interface:IComponentRegistryCalled to register a new resource, providing the given class and constructor supplier.- Specified by:
registerResourcein interfaceIComponentRegistry<ECS_TYPE>- Type Parameters:
T- The type of the resource.- Parameters:
tClass- The class of the resource to register.supplier- The supplier to use to create new instances of the resource.- Returns:
- The registered resource type.
-
registerResource
@Nonnull public <T extends Resource<ECS_TYPE>> ResourceType<ECS_TYPE,T> registerResource(@Nonnull Class<? super T> tClass, @Nonnull String id, @Nonnull BuilderCodec<T> codec) Description copied from interface:IComponentRegistryCalled to register a new resource, providing the given class, id and codec.- Specified by:
registerResourcein interfaceIComponentRegistry<ECS_TYPE>- Type Parameters:
T- The type of the resource.- Parameters:
tClass- The class of the resource to register.id- The unique identifier for the resource.codec- The codec used for serialization and deserialization of the resource.- Returns:
- The registered resource type.
-
registerSpatialResource
@Nonnull public ResourceType<ECS_TYPE, SpatialResource<Ref<ECS_TYPE>, ECS_TYPE>> registerSpatialResource(@Nonnull Supplier<SpatialStructure<Ref<ECS_TYPE>>> supplier) Description copied from interface:IComponentRegistryRegisters a spatial resource with the given supplier for creating spatial structures.- Specified by:
registerSpatialResourcein interfaceIComponentRegistry<ECS_TYPE>- Parameters:
supplier- The supplier that provides instances of SpatialStructure.- Returns:
- The registered spatial resource type.
-
registerSystemType
@Nonnull public <T extends ISystem<ECS_TYPE>> SystemType<ECS_TYPE,T> registerSystemType(@Nonnull Class<? super T> systemTypeClass) Description copied from interface:IComponentRegistryCalled to register a new system type, providing the given class.- Specified by:
registerSystemTypein interfaceIComponentRegistry<ECS_TYPE>- Type Parameters:
T- The type of the system.- Parameters:
systemTypeClass- The class of the system type to register.- Returns:
- The registered system type.
-
registerEntityEventType
@Nonnull public <T extends EcsEvent> EntityEventType<ECS_TYPE,T> registerEntityEventType(@Nonnull Class<? super T> eventTypeClass) Description copied from interface:IComponentRegistryCalled to register a new entity event type, providing the given class.- Specified by:
registerEntityEventTypein interfaceIComponentRegistry<ECS_TYPE>- Type Parameters:
T- The type of the event.- Parameters:
eventTypeClass- The class of the event type to register.- Returns:
- The registered entity event type.
-
registerWorldEventType
@Nonnull public <T extends EcsEvent> WorldEventType<ECS_TYPE,T> registerWorldEventType(@Nonnull Class<? super T> eventTypeClass) Description copied from interface:IComponentRegistryCalled to register a new world event type, providing the given class.- Specified by:
registerWorldEventTypein interfaceIComponentRegistry<ECS_TYPE>- Type Parameters:
T- The type of the event.- Parameters:
eventTypeClass- The class of the event type to register.- Returns:
- The registered world event type.
-
registerSystemGroup
- Specified by:
registerSystemGroupin interfaceIComponentRegistry<ECS_TYPE>- Returns:
- A newly created system group instance.
-
registerSystem
Description copied from interface:IComponentRegistryCalled to register a new system, providing the given system instance.- Specified by:
registerSystemin interfaceIComponentRegistry<ECS_TYPE>- Parameters:
system- The system instance to register.
-
registerSystem
@Deprecated(forRemoval=true) public void registerSystem(@Nonnull ISystem<ECS_TYPE> system, boolean bypassClassCheck) Deprecated, for removal: This API element is subject to removal in a future version.
-