Interface IEnergyHandler


  • public interface IEnergyHandler
    Central controller for creating energy entities and routing energy damage. Access via API.getEnergyController(). All factory methods create entities that are NOT spawned in the world. Configure the entity, then call fire() (projectiles) or spawn() (zones/sweepers/panels) to place it in the world.
    • Method Detail

      • createOrb

        IEnergyOrb createOrb​(IWorld world,
                             IEntity owner,
                             double x,
                             double y,
                             double z,
                             float size)
        Create an energy orb projectile. Not spawned until fire() is called.
        Parameters:
        world - the world
        owner - the owning entity
        x - X position
        y - Y position
        z - Z position
        size - the orb size
        Returns:
        the energy orb entity
      • createBeam

        IEnergyBeam createBeam​(IWorld world,
                               IEntity owner,
                               double x,
                               double y,
                               double z,
                               float beamWidth,
                               float headSize)
        Create an energy beam projectile. Not spawned until fire() is called.
        Parameters:
        world - the world
        owner - the owning entity
        x - X position
        y - Y position
        z - Z position
        beamWidth - the beam width
        headSize - the head size
        Returns:
        the energy beam entity
      • createDisc

        IEnergyDisc createDisc​(IWorld world,
                               IEntity owner,
                               double x,
                               double y,
                               double z,
                               float radius,
                               float thickness)
        Create an energy disc projectile. Not spawned until fire() is called.
        Parameters:
        world - the world
        owner - the owning entity
        x - X position
        y - Y position
        z - Z position
        radius - the disc radius
        thickness - the disc thickness
        Returns:
        the energy disc entity
      • createLaser

        IEnergyLaser createLaser​(IWorld world,
                                 IEntity owner,
                                 double x,
                                 double y,
                                 double z,
                                 float laserWidth)
        Create an energy laser projectile. Not spawned until fire() is called.
        Parameters:
        world - the world
        owner - the owning entity
        x - X position
        y - Y position
        z - Z position
        laserWidth - the laser width
        Returns:
        the energy laser entity
      • createHazard

        IEnergyZone createHazard​(IWorld world,
                                 IEntity owner,
                                 double x,
                                 double y,
                                 double z)
        Create a hazard zone entity with defaults. Not spawned until spawn() is called. Hazards deal continuous damage to entities within the zone.
        Parameters:
        world - the world
        owner - the owning entity
        x - X position
        y - Y position
        z - Z position
        Returns:
        the energy zone entity
      • createTrap

        IEnergyZone createTrap​(IWorld world,
                               IEntity owner,
                               double x,
                               double y,
                               double z)
        Create a trap zone entity with defaults. Not spawned until spawn() is called. Traps trigger when entities enter and deal burst damage.
        Parameters:
        world - the world
        owner - the owning entity
        x - X position
        y - Y position
        z - Z position
        Returns:
        the energy zone entity
      • createSweeper

        IEnergySweeper createSweeper​(IWorld world,
                                     IEntity owner,
                                     double x,
                                     double y,
                                     double z)
        Create a sweeper entity with defaults. Not spawned until spawn() is called. Sweepers rotate a beam that damages entities in its path.
        Parameters:
        world - the world
        owner - the owning entity
        x - X position
        y - Y position
        z - Z position
        Returns:
        the energy sweeper entity
      • createPanel

        IEnergyPanel createPanel​(IWorld world,
                                 IEntity owner,
                                 double x,
                                 double y,
                                 double z)
        Create a panel entity with defaults. Not spawned until spawn() is called. Panels are flat energy barriers that can deal damage on contact.
        Parameters:
        world - the world
        owner - the owning entity
        x - X position
        y - Y position
        z - Z position
        Returns:
        the energy panel entity
      • createExplosion

        IEnergyExplosion createExplosion​(IWorld world,
                                         IEntity owner,
                                         double x,
                                         double y,
                                         double z,
                                         float radius)
        Create an energy explosion entity. Not spawned until spawn() is called. Visual-only by default. Set damage > 0 to enable area damage with falloff.
        Parameters:
        world - the world
        owner - the owning entity
        x - X position
        y - Y position
        z - Z position
        radius - the explosion radius
        Returns:
        the energy explosion entity