Class PixelmonDayCareCondition
java.lang.Object
com.pixelmonmod.pixelmon.api.daycare.impl.PixelmonDayCareCondition
- All Implemented Interfaces:
DayCareCondition,Cloneable
Default Pixelmon implementation of the
DayCareCondition- Since:
- 13/07/2022
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<DayCareDuration>protected List<DayCareRequirement>protected List<DayCareRequirement>protected PokemonSpecification -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a copy of the objectbooleancompleteRequirement(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 requirementsbooleanChecks if all requirements have been completedbooleanisConditionFor(Pokemon parentOne, Pokemon parentTwo, Pokemon child) Determines if the condition is applicable to the two parents attempting to breedvoidread(com.google.gson.Gson gson, com.google.gson.JsonElement json) Reads the condition from JSONvoidread(net.minecraft.nbt.CompoundTag nbt) Reads the condition from NBTvoidskipRequirement(DayCareRequirement requirement) Skips the requirement without any completion steps (i.e.voidwrite(net.minecraft.nbt.CompoundTag nbt) Writes the condition to NBT
-
Field Details
-
spec
-
requirements
-
remainingRequirements
-
durations
-
-
Constructor Details
-
PixelmonDayCareCondition
public PixelmonDayCareCondition()
-
-
Method Details
-
isConditionFor
Description copied from interface:DayCareConditionDetermines if the condition is applicable to the two parents attempting to breed- Specified by:
isConditionForin interfaceDayCareCondition- Parameters:
parentOne- The first parentparentTwo- The second parent- Returns:
- True if it is a condition
-
getDurations
Description copied from interface:DayCareConditionGets the durations to apply from this condition- Specified by:
getDurationsin interfaceDayCareCondition- Returns:
- The durations
-
getRequirements
Description copied from interface:DayCareConditionGets all the requirements- Specified by:
getRequirementsin interfaceDayCareCondition- Returns:
- The requirements
-
getNextRequirement
Description copied from interface:DayCareConditionGets the next requirement, if one exists- Specified by:
getNextRequirementin interfaceDayCareCondition- Returns:
- The next requirement
-
isComplete
public boolean isComplete()Description copied from interface:DayCareConditionChecks if all requirements have been completed- Specified by:
isCompletein interfaceDayCareCondition- Returns:
- Checks if there's any requirements left
-
getRemainingRequirements
Description copied from interface:DayCareConditionGets the remaining requirements- Specified by:
getRemainingRequirementsin interfaceDayCareCondition- Returns:
- The remaining requirements
-
completeRequirement
public boolean completeRequirement(net.minecraft.server.level.ServerPlayer player, DayCareBox box, DayCareRequirement requirement) Description copied from interface:DayCareConditionAttempts to complete the requirement- Specified by:
completeRequirementin interfaceDayCareCondition- Parameters:
player- The playerbox- The boxrequirement- The requirement
-
skipRequirement
Description copied from interface:DayCareConditionSkips the requirement without any completion steps (i.e. taking costs)- Specified by:
skipRequirementin interfaceDayCareCondition- Parameters:
requirement- The requirement
-
read
public void read(com.google.gson.Gson gson, com.google.gson.JsonElement json) Description copied from interface:DayCareConditionReads the condition from JSON- Specified by:
readin interfaceDayCareConditionjson- The JSON object
-
clone
Description copied from interface:DayCareConditionCreates a copy of the object- Specified by:
clonein interfaceDayCareCondition- Overrides:
clonein classObject- Returns:
- new instance
-
write
public void write(net.minecraft.nbt.CompoundTag nbt) Description copied from interface:DayCareConditionWrites the condition to NBT- Specified by:
writein interfaceDayCareCondition- Parameters:
nbt- The NBT to write to
-
read
public void read(net.minecraft.nbt.CompoundTag nbt) Description copied from interface:DayCareConditionReads the condition from NBT- Specified by:
readin interfaceDayCareCondition- Parameters:
nbt- The NBT to read from
-