Class AbstractRequirement

java.lang.Object
com.pixelmonmod.pixelmon.api.daycare.impl.requirement.AbstractRequirement
All Implemented Interfaces:
DayCareRequirement
Direct Known Subclasses:
ItemStackRequirement, OneTimeFemaleItemStackRequirement, PokeDollarsRequirement

public abstract class AbstractRequirement extends Object implements DayCareRequirement
Abstract implementation of the DayCareRequirement
Since:
25/06/2022
  • Field Details

    • typeId

      protected final String typeId
    • error

      protected net.minecraft.network.chat.Component error
  • Constructor Details

    • AbstractRequirement

      protected AbstractRequirement(String typeId)
  • Method Details

    • getTypeId

      public String getTypeId()
      Description copied from interface: DayCareRequirement
      Gets the unique identifier of the breeding requirement type for use in datapacks
      Specified by:
      getTypeId in interface DayCareRequirement
      Returns:
      The unique id
    • getError

      public net.minecraft.network.chat.Component getError()
      Description copied from interface: DayCareRequirement
      Gets the error message for when the requirement isn't met
      Specified by:
      getError in interface DayCareRequirement
      Returns:
      The error message
    • setError

      public void setError(net.minecraft.network.chat.Component error)
      Description copied from interface: DayCareRequirement
      Sets the error message displayed in the GUI to the player
      Specified by:
      setError in interface DayCareRequirement
      Parameters:
      error - The error