Class SpatialResource<T,ECS_TYPE>

java.lang.Object
com.hypixel.hytale.component.spatial.SpatialResource<T,ECS_TYPE>
Type Parameters:
T - the type of data stored in the spatial structure.
ECS_TYPE - the ECS type for the entity reference.
All Implemented Interfaces:
Resource<ECS_TYPE>, Cloneable

public class SpatialResource<T,ECS_TYPE> extends Object implements Resource<ECS_TYPE>
A spatial resource that holds spatial data and a spatial structure.
  • Constructor Details

    • SpatialResource

      public SpatialResource(@Nonnull SpatialStructure<T> spatialStructure)
      Default Constructor for a SpatialResource instance.
      Parameters:
      spatialStructure - the spatial structure to use.
  • Method Details

    • getThreadLocalReferenceList

      @Nonnull public static <ECS_TYPE> List<Ref<ECS_TYPE>> getThreadLocalReferenceList()
      Gets a thread local List of Ref.
      Type Parameters:
      ECS_TYPE - the ECS type for the entity reference
      Returns:
      a thread local list of entity references
    • getSpatialData

      @Nonnull public SpatialData<Ref<ECS_TYPE>> getSpatialData()
      Returns:
      the spatial data for this resource.
    • getSpatialStructure

      @Nonnull public SpatialStructure<T> getSpatialStructure()
      Returns:
      the spatial structure for this resource.
    • clone

      public Resource<ECS_TYPE> clone()
      Specified by:
      clone in interface Resource<T>
      Returns:
      a clone instance of the original resource instance.