Class AbstractDuration

java.lang.Object
com.pixelmonmod.pixelmon.api.daycare.impl.duration.AbstractDuration
All Implemented Interfaces:
DayCareDuration
Direct Known Subclasses:
AdditiveDuration, ConstantDuration, MultiplicativeDuration, NegativeDuration

public abstract class AbstractDuration extends Object implements DayCareDuration
Abstract implementation of a duration taking only the ID
Since:
13/07/2022
  • Field Details

    • id

      protected final String id
  • Constructor Details

    • AbstractDuration

      protected AbstractDuration(String id)
  • Method Details

    • getId

      public String getId()
      Description copied from interface: DayCareDuration
      The unique identifier of the day care duration logic
      Specified by:
      getId in interface DayCareDuration
      Returns:
      The ID
    • getPriority

      public int getPriority()
      Description copied from interface: DayCareDuration
      Gets the duration type's priority (higher priority = will be calculated first)
      Specified by:
      getPriority in interface DayCareDuration
      Returns:
      The priority
    • getDisplay

      public abstract net.minecraft.network.chat.Component getDisplay()
      Description copied from interface: DayCareDuration
      Get the display Component
      Specified by:
      getDisplay in interface DayCareDuration
      Returns:
      the Component