Interface IEntity

All Known Implementing Classes:
ActiveEntity, Block, Blood, BossCreature, Box, BreakableRing, CarrotGrower, Chest, Corpse, Creature, DomesticAnimal, Door, Entity, Fire, FlyOverArea, Food, GameBoard, Gate, GrainField, HousePortal, InvisibleEntity, Item, LoopedSoundSource, NPC, Pet, PlantGrower, Player, Portal, Ring, RPEntity, Sheep, SheepFood, Sign, Spell, StackableItem, StatefulEntity, UseableItem, UseableRing, User, WalkBlocker, Wall

public interface IEntity
  • Field Details

    • PROP_ANIMATED

      static final games.stendhal.client.entity.Property PROP_ANIMATED
      Animated property.
    • PROP_CLASS

      static final games.stendhal.client.entity.Property PROP_CLASS
      Entity class/subclass property.
    • PROP_NAME

      static final games.stendhal.client.entity.Property PROP_NAME
      Name property.
    • PROP_POSITION

      static final games.stendhal.client.entity.Property PROP_POSITION
      Position property.
    • PROP_SIZE

      static final games.stendhal.client.entity.Property PROP_SIZE
      Size property.
    • PROP_TITLE

      static final games.stendhal.client.entity.Property PROP_TITLE
      Title property.
    • PROP_VISIBILITY

      static final games.stendhal.client.entity.Property PROP_VISIBILITY
      Visibility property.
    • PROP_STATE

      static final games.stendhal.client.entity.Property PROP_STATE
      State property
  • Method Details

    • addChangeListener

      void addChangeListener(EntityChangeListener<?> listener)
      Add a change listener.
      Parameters:
      listener - The listener.
    • getArea

      Rectangle2D getArea()
      Get the area the entity occupies.
      Returns:
      A rectange (in world coordinate units).
    • getVisibility

      int getVisibility()
      Get the entity visibility.
      Returns:
      The entity visibility (0 - 100).
    • getHeight

      double getHeight()
      Get the entity height.
      Returns:
      The height.
    • getID

      RPObject.ID getID()
      Returns:
      the represented arianne object id.
    • getEntityClass

      String getEntityClass()
      Get the entity class.
      Returns:
      The entity class.
    • getName

      String getName()
      Get the name.
      Returns:
      The name.
    • getEntitySubclass

      String getEntitySubclass()
      Get the entity sub-class.
      Returns:
      The entity sub-class.
    • getTitle

      String getTitle()
      Get the nicely formatted entity title. This searches the follow attribute order: title, name (w/o underscore), type (w/o underscore).
      Returns:
      The title, or null if unknown.
    • getType

      String getType()
      Get the entity type.
      Returns:
      The type.
    • getX

      double getX()
      Get the X coordinate.
      Returns:
      The X coordinate.
    • getY

      double getY()
      Get the Y coordinate.
      Returns:
      The Y coordinate.
    • getRPObject

      RPObject getRPObject()
      Get the RPObject this represents.
      Returns:
      The RPObject.
    • getWidth

      double getWidth()
      Get the entity width.
      Returns:
      The width.
    • isOnGround

      boolean isOnGround()
      Determine if this entity is on the ground.
      Returns:
      true if the entity is on the ground.
    • isUser

      boolean isUser()
      Check if the entity is the user.
      Returns:
      true if the entity is the user
    • getResistance

      int getResistance()
      Get the resistance this has on other entities (0-100).
      Returns:
      The resistance.
    • getResistance

      int getResistance(IEntity entity)
      Get the amount of resistance between this and another entity (0-100).
      Parameters:
      entity - The entity to check against.
      Returns:
      The effective resistance.
    • getSlot

      RPSlot getSlot(String name)
      Gets the slot specified by name.
      Parameters:
      name - of the slot
      Returns:
      the specified slot or null if the entity does not have this slot
    • initialize

      void initialize(RPObject object)
      Initialize this entity for an object.
      Parameters:
      object - The object.
      See Also:
      release()
    • isObstacle

      boolean isObstacle(IEntity entity)
      Determine if this is an obstacle for another entity.
      Parameters:
      entity - The entity to check against.
      Returns:
      true the entity can not enter this entity's area.
    • release

      void release()
      Release this entity. This should clean anything that isn't automatically released (such as unregister callbacks, cancel external operations, etc).
      See Also:
      initialize(RPObject)
    • removeChangeListener

      void removeChangeListener(EntityChangeListener<?> listener)
      Remove a change listener.
      Parameters:
      listener - The listener.
    • update

      void update(int delta)
      Update cycle.
      Parameters:
      delta - The time (in ms) since last call.
    • getCursor

      String getCursor()
      gets the cursor name
      Returns:
      name of cursor
    • getPath

      List<String> getPath()
      Get identifier path for the entity.
      Returns:
      List of object identifiers and slot names that make up the complete path to the entity
    • addContentChangeListener

      void addContentChangeListener(ContentChangeListener listener)
      Add a listener for content changes
      Parameters:
      listener -
    • removeContentChangeListener

      void removeContentChangeListener(ContentChangeListener listener)
      Remove a content change listener.
      Parameters:
      listener -