Class Effect

java.lang.Object
dev.twilite.game.wrapper.Effect
All Implemented Interfaces:
Id, Unit

public class Effect extends Object implements Unit, Id
Spot animation/effect currently present in the world.
  • Constructor Details

    • Effect

      public Effect(dev.twilite.game.internal.memory.RSEffect memory, World world)
      Wraps a native effect provider.
  • Method Details

    • id

      public int id()
      Returns the effect id.
      Specified by:
      id in interface Id
    • constantName

      public String constantName()
      Description copied from interface: Id
      Returns the generated gameval constant name for Id.id(), or the numeric id as text when no constant is known.

      This is intended for logs and diagnostics where a stable symbolic name is easier to read than a raw number.

      Specified by:
      constantName in interface Id
    • animation

      public int animation()
      Returns the current effect animation id.
    • active

      public boolean active()
      Returns whether the effect is currently active.
    • world

      public World world()
      Description copied from interface: Unit
      Returns the world this unit belongs to.
      Specified by:
      world in interface Unit
    • coord

      public Coord coord()
      Description copied from interface: Unit
      Returns this unit's world coordinate.
      Specified by:
      coord in interface Unit
    • fine

      public Coord.Fine fine()
      Description copied from interface: Unit
      Returns this unit's fine coordinate, representing its model location.
      Specified by:
      fine in interface Unit
    • map

      public Coord.Map map()
      Description copied from interface: Unit
      Returns this unit's map coordinate relative to the loaded world area.
      Specified by:
      map in interface Unit