Contents
Class SpawnReferenceSystems.BeaconAddRemoveSystem
java.lang.Object
com.hypixel.hytale.component.system.System<EntityStore>
com.hypixel.hytale.component.system.RefSystem<EntityStore>
com.hypixel.hytale.server.npc.systems.SpawnReferenceSystems.BeaconAddRemoveSystem
- All Implemented Interfaces:
ISystem<EntityStore>, QuerySystem<EntityStore>
- Enclosing class:
SpawnReferenceSystems
A ref system that handles correctly linking up NPC entities with their corresponding
LegacySpawnBeaconEntity on load.
Must be set to run after the SpawnBeaconSystems otherwise entities may not be correctly initialised!
-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionBeaconAddRemoveSystem(ComponentType<EntityStore, SpawnBeaconReference> spawnReferenceComponentType, ComponentType<EntityStore, LegacySpawnBeaconEntity> legacySpawnBeaconComponent) Default Constructor for aSpawnReferenceSystems.BeaconAddRemoveSysteminstance -
Method Summary
Modifier and TypeMethodDescriptiongetQuery()voidonEntityAdded(Ref<EntityStore> ref, AddReason reason, Store<EntityStore> store, CommandBuffer<EntityStore> commandBuffer) Called after an entity has been added to aStoreand has anArchetypethat fulfills theQueryprovided byQuerySystem.getQuery()}.voidonEntityRemove(Ref<EntityStore> ref, RemoveReason reason, Store<EntityStore> store, CommandBuffer<EntityStore> commandBuffer) Called before an entity has been removed from aStoreand has anArchetypethat fulfills theQueryprovided byQuerySystem.getQuery()}.Methods 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
-
BeaconAddRemoveSystem
public BeaconAddRemoveSystem(@Nonnull ComponentType<EntityStore, SpawnBeaconReference> spawnReferenceComponentType, @Nonnull ComponentType<EntityStore, LegacySpawnBeaconEntity> legacySpawnBeaconComponent) Default Constructor for aSpawnReferenceSystems.BeaconAddRemoveSysteminstance- Parameters:
spawnReferenceComponentType- TheSpawnBeaconReferencecomponent typelegacySpawnBeaconComponent- TheLegacySpawnBeaconEntitycomponent type
-
-
Method Details
-
getQuery
-
onEntityAdded
public void onEntityAdded(@Nonnull Ref<EntityStore> ref, @Nonnull AddReason reason, @Nonnull Store<EntityStore> store, @Nonnull CommandBuffer<EntityStore> commandBuffer) Description copied from class:RefSystemCalled after an entity has been added to aStoreand has anArchetypethat fulfills theQueryprovided byQuerySystem.getQuery()}.- Specified by:
onEntityAddedin classRefSystem<EntityStore>- Parameters:
ref- The entity reference of the added entity.reason- The reason for the entity being added.store- The store the entity was added to.commandBuffer- The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the entity add.
-
onEntityRemove
public void onEntityRemove(@Nonnull Ref<EntityStore> ref, @Nonnull RemoveReason reason, @Nonnull Store<EntityStore> store, @Nonnull CommandBuffer<EntityStore> commandBuffer) Description copied from class:RefSystemCalled before an entity has been removed from aStoreand has anArchetypethat fulfills theQueryprovided byQuerySystem.getQuery()}.- Specified by:
onEntityRemovein classRefSystem<EntityStore>- Parameters:
ref- The entity reference of the removed entity.reason- The reason for the entity being removed.store- The store the entity is being removed from.commandBuffer- The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the entity remove.
-