Contents
Class CompanionBlockSpawnerSpatialSystem
java.lang.Object
com.hypixel.hytale.component.system.System<ChunkStore>
com.hypixel.hytale.component.system.tick.TickingSystem<ChunkStore>
com.hypixel.hytale.component.spatial.SpatialSystem<ChunkStore>
com.hypixel.hytale.builtin.companionblockspawner.CompanionBlockSpawnerSpatialSystem
- All Implemented Interfaces:
ISystem<ChunkStore>, QuerySystem<ChunkStore>, TickableSystem<ChunkStore>
Indexes all
CompanionBlockSpawnerBlock blocks (spawner blocks and requirements) in a KDTree spatial resource
by their world position, so the companion block spawner systems can find participating blocks near a placed/broken
block.
Modelled on ItemContainerBlockSpatialSystem. Participating blocks are rare, so the index is rebuilt every
tick rather than sharing the block-state rebuild flag (which is consume-on-read and already owned by the
item-container system).
-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionCompanionBlockSpawnerSpatialSystem(ResourceType<ChunkStore, SpatialResource<Ref<ChunkStore>, ChunkStore>> resourceType, ComponentType<ChunkStore, CompanionBlockSpawnerBlock> spawnerBlockComponentType) -
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector3dgetPosition(ArchetypeChunk<ChunkStore> 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
-
Constructor Details
-
CompanionBlockSpawnerSpatialSystem
public CompanionBlockSpawnerSpatialSystem(ResourceType<ChunkStore, SpatialResource<Ref<ChunkStore>, ChunkStore>> resourceType, ComponentType<ChunkStore, CompanionBlockSpawnerBlock> spawnerBlockComponentType)
-
-
Method Details
-
getPosition
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<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
nullif the entity does not have a position.
-
getQuery
-