public class PixelmonDayCareCondition extends java.lang.Object implements DayCareCondition
DayCareCondition
Modifier and Type | Field and Description |
---|---|
protected java.util.List<DayCareDuration> |
durations |
protected java.util.List<DayCareRequirement> |
remainingRequirements |
protected java.util.List<DayCareRequirement> |
requirements |
protected PokemonSpecification |
spec |
Constructor and Description |
---|
PixelmonDayCareCondition() |
Modifier and Type | Method and Description |
---|---|
DayCareCondition |
clone()
Creates a copy of the object
|
boolean |
completeRequirement(net.minecraft.entity.player.ServerPlayerEntity player,
DayCareBox box,
DayCareRequirement requirement)
Attempts to complete the requirement
|
java.util.List<DayCareDuration> |
getDurations()
Gets the durations to apply from this condition
|
java.util.Optional<DayCareRequirement> |
getNextRequirement()
Gets the next requirement, if one exists
|
java.util.List<DayCareRequirement> |
getRemainingRequirements()
Gets the remaining requirements
|
java.util.List<DayCareRequirement> |
getRequirements()
Gets all the requirements
|
boolean |
isComplete()
Checks if all requirements have been completed
|
boolean |
isConditionFor(Pokemon parentOne,
Pokemon parentTwo,
Pokemon child)
Determines if the condition is applicable to the two parents attempting to breed
|
void |
read(net.minecraft.nbt.CompoundNBT nbt)
Reads the condition from NBT
|
void |
read(com.google.gson.Gson gson,
com.google.gson.JsonElement json)
Reads the condition from JSON
|
void |
skipRequirement(DayCareRequirement requirement)
Skips the requirement without any completion steps (i.e.
|
void |
write(net.minecraft.nbt.CompoundNBT nbt)
Writes the condition to NBT
|
protected PokemonSpecification spec
protected java.util.List<DayCareRequirement> requirements
protected java.util.List<DayCareRequirement> remainingRequirements
protected java.util.List<DayCareDuration> durations
public boolean isConditionFor(Pokemon parentOne, Pokemon parentTwo, Pokemon child)
DayCareCondition
isConditionFor
in interface DayCareCondition
parentOne
- The first parentparentTwo
- The second parentpublic java.util.List<DayCareDuration> getDurations()
DayCareCondition
getDurations
in interface DayCareCondition
public java.util.List<DayCareRequirement> getRequirements()
DayCareCondition
getRequirements
in interface DayCareCondition
public java.util.Optional<DayCareRequirement> getNextRequirement()
DayCareCondition
getNextRequirement
in interface DayCareCondition
public boolean isComplete()
DayCareCondition
isComplete
in interface DayCareCondition
public java.util.List<DayCareRequirement> getRemainingRequirements()
DayCareCondition
getRemainingRequirements
in interface DayCareCondition
public boolean completeRequirement(net.minecraft.entity.player.ServerPlayerEntity player, DayCareBox box, DayCareRequirement requirement)
DayCareCondition
completeRequirement
in interface DayCareCondition
player
- The playerbox
- The boxrequirement
- The requirementpublic void skipRequirement(DayCareRequirement requirement)
DayCareCondition
skipRequirement
in interface DayCareCondition
requirement
- The requirementpublic void read(com.google.gson.Gson gson, com.google.gson.JsonElement json)
DayCareCondition
read
in interface DayCareCondition
json
- The JSON objectpublic DayCareCondition clone()
DayCareCondition
clone
in interface DayCareCondition
clone
in class java.lang.Object
public void write(net.minecraft.nbt.CompoundNBT nbt)
DayCareCondition
write
in interface DayCareCondition
nbt
- The NBT to write topublic void read(net.minecraft.nbt.CompoundNBT nbt)
DayCareCondition
read
in interface DayCareCondition
nbt
- The NBT to read from