Class AugmentBlocksSpatialSystem

All Implemented Interfaces:
ISystem<ChunkStore>, QuerySystem<ChunkStore>, TickableSystem<ChunkStore>

public class AugmentBlocksSpatialSystem extends SpatialSystem<ChunkStore>
Indexes all AugmentBlock blocks in a KDTree spatial resource by world position, so any augment block can resolve another participating block's current level without scanning the world. Rebuilt every tick (participating blocks are rare), mirroring CompanionBlockSpawnerSpatialSystem.
  • Field Details

  • Constructor Details

  • Method Details

    • getPosition

      @Nullable public org.joml.Vector3d getPosition(@Nonnull ArchetypeChunk<ChunkStore> archetypeChunk, int index)
      Description copied from class: SpatialSystem
      Called to fetch a position for an entity in the given archetype chunk at the specified index.
      Specified by:
      getPosition in class SpatialSystem<ChunkStore>
      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.
    • getQuery

      @Nullable public Query<ChunkStore> getQuery()