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.

  • Constructor Details

  • Method Details

    • tick

      public void tick(float dt, int systemIndex, @Nonnull Store<ECS_TYPE> store)
      Description copied from class: TickingSystem
      Required reading: CommandBuffer

      Called once per world tick.

      Specified by:
      tick in interface TickableSystem<ECS_TYPE>
      Specified by:
      tick in class TickingSystem<ECS_TYPE>
      Parameters:
      dt - The delta time in seconds.
      systemIndex - The index of this system, used for faster lookups in Store.
    • 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 null if the entity does not have a position.