Contents
Class SpatialSystem<ECS_TYPE>
java.lang.Object
com.hypixel.hytale.component.system.System<ECS_TYPE>
com.hypixel.hytale.component.system.tick.TickingSystem<ECS_TYPE>
com.hypixel.hytale.component.spatial.SpatialSystem<ECS_TYPE>
- Type Parameters:
ECS_TYPE- the ECS type for the entity reference.
- All Implemented Interfaces:
ISystem<ECS_TYPE>, QuerySystem<ECS_TYPE>, TickableSystem<ECS_TYPE>
- Direct Known Subclasses:
AugmentBlocksSpatialSystem, BeaconSpatialSystem, CompanionBlockSpawnerSpatialSystem, EntitySpatialSystem, ItemContainerBlockSpatialSystem, ItemSpatialSystem, LegacyBeaconSpatialSystem, NetworkSendableSpatialSystem, NPCSpatialSystem, PathSpatialSystem, PlayerSpatialSystem, SpawnMarkerSpatialSystem, TangiableEntitySpatialSystem
public abstract class SpatialSystem<ECS_TYPE>
extends TickingSystem<ECS_TYPE>
implements QuerySystem<ECS_TYPE>
A system that updates a spatial data of a spatial resource with entity positions.
This allows for the position of the entities to be determined by different entity components or logic.
-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionSpatialSystem(ResourceType<ECS_TYPE, SpatialResource<Ref<ECS_TYPE>, ECS_TYPE>> resourceType) Default Constructor for aSpatialSysteminstance. -
Method Summary
Modifier and TypeMethodDescriptionabstract org.joml.Vector3dgetPosition(ArchetypeChunk<ECS_TYPE> archetypeChunk, int index) Called to fetch a position for an entity in the given archetype chunk at the specified index.voidRequired reading:CommandBufferMethods inherited from class System
getComponentRegistrations, getResourceRegistrations, registerResource, registerResourceMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ISystem
getDependencies, getGroup, onSystemRegistered, onSystemUnregisteredMethods inherited from interface QuerySystem
getHierarchyScope, getQuery, test
-
Constructor Details
-
SpatialSystem
public SpatialSystem(@Nonnull ResourceType<ECS_TYPE, SpatialResource<Ref<ECS_TYPE>, ECS_TYPE>> resourceType) Default Constructor for aSpatialSysteminstance.- Parameters:
resourceType- the resource type of the spatial resource to update.
-
-
Method Details
-
tick
Description copied from class:TickingSystem- Specified by:
tickin interfaceTickableSystem<ECS_TYPE>- Specified by:
tickin classTickingSystem<ECS_TYPE>- Parameters:
dt- The delta time in seconds.systemIndex- The index of this system, used for faster lookups inStore.
-
getPosition
@Nullable public abstract org.joml.Vector3d getPosition(@Nonnull ArchetypeChunk<ECS_TYPE> archetypeChunk, int index) Called to fetch a position for an entity in the given archetype chunk at the specified index.- Parameters:
archetypeChunk- The archetype chunk containing the entity.index- The index of the entity within the archetype chunk.- Returns:
- the position of the entity, or
nullif the entity does not have a position.
-