Interface DayCareCondition

All Superinterfaces:
Cloneable
All Known Implementing Classes:
PixelmonDayCareCondition

public interface DayCareCondition extends Cloneable
A condition for daycare to begin the breeding process
Since:
13/07/2022
  • Method Details

    • isConditionFor

      boolean isConditionFor(Pokemon parentOne, Pokemon parentTwo, Pokemon child)
      Determines if the condition is applicable to the two parents attempting to breed
      Parameters:
      parentOne - The first parent
      parentTwo - The second parent
      Returns:
      True if it is a condition
    • getDurations

      List<DayCareDuration> getDurations()
      Gets the durations to apply from this condition
      Returns:
      The durations
    • getRequirements

      List<DayCareRequirement> getRequirements()
      Gets all the requirements
      Returns:
      The requirements
    • getNextRequirement

      Optional<DayCareRequirement> getNextRequirement()
      Gets the next requirement, if one exists
      Returns:
      The next requirement
    • isComplete

      boolean isComplete()
      Checks if all requirements have been completed
      Returns:
      Checks if there's any requirements left
    • getRemainingRequirements

      List<DayCareRequirement> getRemainingRequirements()
      Gets the remaining requirements
      Returns:
      The remaining requirements
    • completeRequirement

      boolean completeRequirement(net.minecraft.server.level.ServerPlayer player, DayCareBox box, DayCareRequirement requirement)
      Attempts to complete the requirement
      Parameters:
      player - The player
      box - The box
      requirement - The requirement
    • skipRequirement

      void skipRequirement(DayCareRequirement requirement)
      Skips the requirement without any completion steps (i.e. taking costs)
      Parameters:
      requirement - The requirement
    • read

      void read(com.google.gson.Gson gson, com.google.gson.JsonElement json)
      Reads the condition from JSON
      Parameters:
      json - The JSON object
    • write

      void write(net.minecraft.nbt.CompoundTag nbt)
      Writes the condition to NBT
      Parameters:
      nbt - The NBT to write to
    • read

      void read(net.minecraft.nbt.CompoundTag nbt)
      Reads the condition from NBT
      Parameters:
      nbt - The NBT to read from
    • clone

      Creates a copy of the object
      Returns:
      new instance