Interface DayCareCondition
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
PixelmonDayCareCondition
A condition for daycare to begin the breeding process
- Since:
- 13/07/2022
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a copy of the objectboolean
completeRequirement
(net.minecraft.server.level.ServerPlayer player, DayCareBox box, DayCareRequirement requirement) Attempts to complete the requirementGets the durations to apply from this conditionGets the next requirement, if one existsGets the remaining requirementsGets all the requirementsboolean
Checks if all requirements have been completedboolean
isConditionFor
(Pokemon parentOne, Pokemon parentTwo, Pokemon child) Determines if the condition is applicable to the two parents attempting to breedvoid
read
(com.google.gson.Gson gson, com.google.gson.JsonElement json) Reads the condition from JSONvoid
read
(net.minecraft.nbt.CompoundTag nbt) Reads the condition from NBTvoid
skipRequirement
(DayCareRequirement requirement) Skips the requirement without any completion steps (i.e.void
write
(net.minecraft.nbt.CompoundTag nbt) Writes the condition to NBT
-
Method Details
-
isConditionFor
Determines if the condition is applicable to the two parents attempting to breed- Parameters:
parentOne
- The first parentparentTwo
- 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 playerbox
- The boxrequirement
- The requirement
-
skipRequirement
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
DayCareCondition clone()Creates a copy of the object- Returns:
- new instance
-