Class Seed

All Implemented Interfaces:
EquipListener, TurnListener, UseListener, Stackable<StackableItem>, Killer, Cloneable, Iterable<String>, Serializable

public class Seed extends StackableItem
A seed can be planted. The plant action defines the behaviour (e.g. only plantable on fertile ground). The infostring stores what it will grow.
  • Constructor Details

    • Seed

      public Seed(Seed item)
    • Seed

      public Seed(String name, String clazz, String subclass, Map<String,​String> attributes)
      Creates a new seed
      Parameters:
      name -
      clazz -
      subclass -
      attributes -
  • Method Details

    • onUsed

      public boolean onUsed(RPEntity user)
      Description copied from interface: UseListener
      Invoked when the object is used.
      Specified by:
      onUsed in interface UseListener
      Overrides:
      onUsed in class Item
      Parameters:
      user - the RPEntity who uses the object
      Returns:
      true if successful
    • describe

      public String describe()
      Description copied from class: Entity
      Describes the entity (if a players looks at it).
      Overrides:
      describe in class Item
      Returns:
      description from the players point of view