Contents
Class DeathSystems.OnDeathSystem
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
- All Implemented Interfaces:
ISystem<EntityStore>, QuerySystem<EntityStore>
- Direct Known Subclasses:
CarriedBlockSystems.DropOnDeath, DeathSystems.ClearEntityEffects, DeathSystems.ClearHealth, DeathSystems.ClearInteractions, DeathSystems.DeathAnimation, DeathSystems.DropPlayerDeathItems, DeathSystems.KillFeed, DeathSystems.PlayerDeathMarker, DeathSystems.PlayerDeathScreen, DeathSystems.PlayerDropItemsConfig, DeathSystems.PlayerKilledPlayer, DeathSystems.RunDeathInteractions, DeathSystems.StopVoiceOnDeath, FlockDeathSystems.EntityDeath, FlockDeathSystems.PlayerDeath, KillTrackerSystem, NPCDeathSystems.EntityViewSystem, NPCDeathSystems.NPCKillsEntitySystem, NPCMemory.KillMemoriesSystem, NPCMountSystems.DismountOnMountDeath, NPCMountSystems.DismountOnPlayerDeath, NPCSystems.OnDeathSystem, SpawnReferenceSystems.MarkerDeathSystem, TriggerVolumeDeathSystem
- Enclosing class:
DeathSystems
public abstract static class DeathSystems.OnDeathSystem
extends RefChangeSystem<EntityStore, DeathComponent>
A ref change system used by death-related systems to reduce boilerplate
Reduces boilerplate by handling some of the common values for death systems.
-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonComponentRemoved(Ref<EntityStore> ref, DeathComponent component, Store<EntityStore> store, CommandBuffer<EntityStore> commandBuffer) Called after a component has been removed from an entity and has aComponentTypethat matchesRefChangeSystem.componentType().voidonComponentSet(Ref<EntityStore> ref, DeathComponent oldComponent, DeathComponent newComponent, Store<EntityStore> store, CommandBuffer<EntityStore> commandBuffer) Called after a component has been set on an entity and has aComponentTypethat matchesRefChangeSystem.componentType().Methods inherited from class RefChangeSystem
onComponentAddedMethods 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, getQuery, test
-
Constructor Details
-
OnDeathSystem
public OnDeathSystem()
-
-
Method Details
-
componentType
- Specified by:
componentTypein classRefChangeSystem<EntityStore, DeathComponent>- Returns:
- the component type that we're listening for changes from
-
onComponentSet
public void onComponentSet(@Nonnull Ref<EntityStore> ref, DeathComponent oldComponent, @Nonnull DeathComponent newComponent, @Nonnull Store<EntityStore> store, @Nonnull CommandBuffer<EntityStore> commandBuffer) Description copied from class:RefChangeSystemCalled after a component has been set on an entity and has aComponentTypethat matchesRefChangeSystem.componentType().- Specified by:
onComponentSetin classRefChangeSystem<EntityStore, DeathComponent>- Parameters:
ref- The reference to the affiliated entityoldComponent- The old component instance being replacednewComponent- The new component instance being setstore- 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 set.
-
onComponentRemoved
public void onComponentRemoved(@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 removed from an entity and has aComponentTypethat matchesRefChangeSystem.componentType().- Specified by:
onComponentRemovedin classRefChangeSystem<EntityStore, DeathComponent>- Parameters:
ref- The reference to the affiliated entitycomponent- The component instance being removedstore- 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 remove.
-