Class DamageSystem
java.lang.Object
com.hypixel.hytale.component.system.EventSystem<com.hypixel.hytale.server.core.modules.entity.damage.Damage>
com.hypixel.hytale.component.system.EntityEventSystem<com.hypixel.hytale.server.core.universe.world.storage.EntityStore, com.hypixel.hytale.server.core.modules.entity.damage.Damage>
com.hypixel.hytale.server.core.modules.entity.damage.DamageEventSystem
fr.hytale.loader.internal.DamageSystem
- All Implemented Interfaces:
com.hypixel.hytale.component.system.ISystem<com.hypixel.hytale.server.core.universe.world.storage.EntityStore>, com.hypixel.hytale.component.system.QuerySystem<com.hypixel.hytale.server.core.universe.world.storage.EntityStore>
public class DamageSystem
extends com.hypixel.hytale.server.core.modules.entity.damage.DamageEventSystem
Internal ECS system for handling player damage events.
This system hooks into Hytale's damage event processing to detect when players take damage and dispatches HytaleLoader's PlayerDamageEvent for mods to listen to.
- Since:
- 1.0.0
- Version:
- 1.0.4
- Author:
- HytaleLoader
-
Field Summary
Fields inherited from interface com.hypixel.hytale.component.system.ISystem
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.hypixel.hytale.component.query.Query<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> getQuery()Gets the query for this system to determine which entities it processes.voidhandle(int index, com.hypixel.hytale.component.ArchetypeChunk<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> chunk, com.hypixel.hytale.component.Store<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> store, com.hypixel.hytale.component.CommandBuffer<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> commandBuffer, com.hypixel.hytale.server.core.modules.entity.damage.Damage event) Handles damage events from the ECS and dispatches PlayerDamageEvent.Methods inherited from class com.hypixel.hytale.component.system.EntityEventSystem
handleInternalMethods inherited from class com.hypixel.hytale.component.system.EventSystem
getEventType, shouldProcessEventMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.component.system.ISystem
getDependencies, getGroup, onSystemRegistered, onSystemUnregisteredMethods inherited from interface com.hypixel.hytale.component.system.QuerySystem
test
-
Constructor Details
-
DamageSystem
public DamageSystem()
-
-
Method Details
-
handle
public void handle(int index, com.hypixel.hytale.component.ArchetypeChunk<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> chunk, com.hypixel.hytale.component.Store<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> store, com.hypixel.hytale.component.CommandBuffer<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> commandBuffer, com.hypixel.hytale.server.core.modules.entity.damage.Damage event) Handles damage events from the ECS and dispatches PlayerDamageEvent.- Specified by:
handlein classcom.hypixel.hytale.component.system.EntityEventSystem<com.hypixel.hytale.server.core.universe.world.storage.EntityStore, com.hypixel.hytale.server.core.modules.entity.damage.Damage>- Parameters:
index- the index in the archetype chunkchunk- the archetype chunk containing entity datastore- the entity storecommandBuffer- the command buffer for entity operationsevent- the damage event
-
getQuery
public com.hypixel.hytale.component.query.Query<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> getQuery()Gets the query for this system to determine which entities it processes.- Returns:
- the component query for player entities
-