Contents
Class SpawnReferenceSystems.MarkerDeathSystem
java.lang.Object
com.hypixel.hytale.component.system.System<EntityStore>
com.hypixel.hytale.component.system.RefChangeSystem<EntityStore, DeathComponent>
com.hypixel.hytale.server.core.modules.entity.damage.DeathSystems.OnDeathSystem
com.hypixel.hytale.server.npc.systems.SpawnReferenceSystems.MarkerDeathSystem
- All Implemented Interfaces:
ISystem<EntityStore>, QuerySystem<EntityStore>
- Enclosing class:
SpawnReferenceSystems
Disconnects a spawned NPC from its
SpawnMarkerEntity as soon as it dies, rather than waiting for the
corpse to be removed. This frees the marker's spawn slot during the death animation so it can respawn or be
manually re-triggered. The SpawnMarkerReference is removed so the eventual removal does not disconnect
a second time.-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionMarkerDeathSystem(ComponentType<EntityStore, SpawnMarkerReference> spawnReferenceComponentType, ComponentType<EntityStore, SpawnMarkerEntity> spawnMarkerEntityComponentType) Default Constructor for aSpawnReferenceSystems.MarkerDeathSysteminstance -
Method Summary
Modifier and TypeMethodDescriptiongetQuery()voidonComponentAdded(Ref<EntityStore> ref, DeathComponent component, Store<EntityStore> store, CommandBuffer<EntityStore> commandBuffer) Called after a component has been added to an entity and has aComponentTypethat matchesRefChangeSystem.componentType().Methods inherited from class DeathSystems.OnDeathSystem
componentType, onComponentRemoved, onComponentSetMethods 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
-
MarkerDeathSystem
public MarkerDeathSystem(@Nonnull ComponentType<EntityStore, SpawnMarkerReference> spawnReferenceComponentType, @Nonnull ComponentType<EntityStore, SpawnMarkerEntity> spawnMarkerEntityComponentType) Default Constructor for aSpawnReferenceSystems.MarkerDeathSysteminstance- Parameters:
spawnReferenceComponentType- TheSpawnMarkerReferencecomponent typespawnMarkerEntityComponentType- TheSpawnMarkerEntitycomponent type
-
-
Method Details
-
getQuery
-
onComponentAdded
public void onComponentAdded(@Nonnull Ref<EntityStore> ref, @Nonnull DeathComponent component, @Nonnull Store<EntityStore> store, @Nonnull CommandBuffer<EntityStore> commandBuffer) Description copied from class:RefChangeSystemCalled after a component has been added to an entity and has aComponentTypethat matchesRefChangeSystem.componentType().- Specified by:
onComponentAddedin classRefChangeSystem<EntityStore, DeathComponent>- Parameters:
ref- The reference to the affiliated entitycomponent- The component instance being addedstore- The store affiliated with the entitycommandBuffer- The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the component add.
-