Contents
Class PlayerSpatialSystem
java.lang.Object
com.hypixel.hytale.component.system.System<EntityStore>
com.hypixel.hytale.component.system.tick.TickingSystem<EntityStore>
com.hypixel.hytale.component.spatial.SpatialSystem<EntityStore>
com.hypixel.hytale.server.core.modules.entity.system.PlayerSpatialSystem
- All Implemented Interfaces:
ISystem<EntityStore>, QuerySystem<EntityStore>, TickableSystem<EntityStore>
A spatial system for player entities, which provides the position via the players transform component
-
Field Summary
FieldsFields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionPlayerSpatialSystem(ResourceType<EntityStore, SpatialResource<Ref<EntityStore>, EntityStore>> spatialResource) Default Constructor for aPlayerSpatialSysteminstance -
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector3dgetPosition(ArchetypeChunk<EntityStore> archetypeChunk, int index) Called to fetch a position for an entity in the given archetype chunk at the specified index.getQuery()Methods inherited from class SpatialSystem
tickMethods 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, test
-
Field Details
-
QUERY
The query used by this system
-
-
Constructor Details
-
PlayerSpatialSystem
public PlayerSpatialSystem(@Nonnull ResourceType<EntityStore, SpatialResource<Ref<EntityStore>, EntityStore>> spatialResource) Default Constructor for aPlayerSpatialSysteminstance- Parameters:
spatialResource- The spatial resource from the world store
-
-
Method Details
-
getQuery
-
getPosition
@Nonnull public org.joml.Vector3d getPosition(@Nonnull ArchetypeChunk<EntityStore> archetypeChunk, int index) Description copied from class:SpatialSystemCalled to fetch a position for an entity in the given archetype chunk at the specified index.- Specified by:
getPositionin classSpatialSystem<EntityStore>- 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.
-