Class Food

All Implemented Interfaces:
IEntity, RPObjectChangeListener
Direct Known Subclasses:
SheepFood

public abstract class Food extends ActiveEntity
A food entity.
  • Field Details

    • PROP_AMOUNT

      public static final games.stendhal.client.entity.Property PROP_AMOUNT
      Amount property.
  • Constructor Details

    • Food

      public Food()
  • Method Details

    • getAmount

      public int getAmount()
      Get the amount.
      Returns:
      The amount.
    • initialize

      public void initialize(RPObject object)
      Initialize this entity for an object.
      Specified by:
      initialize in interface IEntity
      Overrides:
      initialize in class ActiveEntity
      Parameters:
      object - The object.
      See Also:
      Entity.release()
    • onChangedAdded

      public void onChangedAdded(RPObject object, RPObject changes)
      A slot object added/changed attribute(s).
      Specified by:
      onChangedAdded in interface RPObjectChangeListener
      Overrides:
      onChangedAdded in class Entity
      Parameters:
      object - The base slot object.
      changes - The slot changes.
    • addSounds

      protected void addSounds(String groupName, String categoryName, String... soundNames)
    • onPosition

      protected void onPosition(double x, double y)
      Description copied from class: Entity
      When the entity's position changed.
      Overrides:
      onPosition in class Entity
      Parameters:
      x - The new X coordinate.
      y - The new Y coordinate.
    • playRandomSoundFromCategory

      protected void playRandomSoundFromCategory(String groupName, String categoryName)
    • playRandomSoundFromGroup

      protected void playRandomSoundFromGroup(String groupName, String categoryName, long waitTimeInMilliSec)
    • playSoundFromCategory

      protected void playSoundFromCategory(String groupName, String categoryName)
    • playSoundFromCategory

      protected void playSoundFromCategory(String groupName, String categoryName, int index)