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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.hypixel.hytale.component.query.Query<com.hypixel.hytale.server.core.universe.world.storage.EntityStore>
    Gets the query for this system to determine which entities it processes.
    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.

    Methods inherited from class com.hypixel.hytale.component.system.EntityEventSystem

    handleInternal

    Methods inherited from class com.hypixel.hytale.component.system.EventSystem

    getEventType, shouldProcessEvent

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.hypixel.hytale.component.system.ISystem

    getDependencies, getGroup, onSystemRegistered, onSystemUnregistered

    Methods 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:
      handle in class com.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 chunk
      chunk - the archetype chunk containing entity data
      store - the entity store
      commandBuffer - the command buffer for entity operations
      event - 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