Class PixelmonBreedingLogic
java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.egg.impl.PixelmonBreedingLogic
- All Implemented Interfaces:
BreedingLogicFactory
Default Pixelmon implementation of the breeding logic
- Since:
- 24/06/2022
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateForm(Pokemon parentOne, Pokemon parentTwo, Species child) Calculates the form of the child using the two parentscalculatePalette(Pokemon parentOne, Pokemon parentTwo, Species child) Calculates the palette of the child using the two parentscalculateSpecies(Pokemon parentOne, Pokemon parentTwo) Calculates the species created by the two parent PokemonsbooleanChecks if the two Pokemon can breedbooleancanLearnVoltTackle(Species species, Pokemon parentOne, Pokemon parentTwo) If the pokemon can learn volt tackle movefinal booleancheckIncense(net.minecraft.world.item.Item itemTypeParent, net.minecraft.world.item.Item itemTypeOther, Pokemon parentForEggLine, net.minecraft.world.item.Item neededItem, RegistryValue<Species> baby, RegistryValue<Species>... parents) Checks the incensefindFather(Pokemon parentOne, Pokemon parentTwo) Obtains the father of the two parentsfindMother(Pokemon parentOne, Pokemon parentTwo) Obtains the mother of the two parentsgetEggAbility(Stats form, Pokemon parentOne, Pokemon parentTwo) Calculates the new Ability for the Pokemon from the two parentsgetEggAbilitySlot(Stats form, Pokemon parentOne, Pokemon parentTwo) Calculates the new Ability slot for the Pokemon from the two parentsgetEggMoves(Stats egg, Pokemon parent, Set<ImmutableAttack> allEggMoves) Gets the egg movesgetEggMoveset(Stats egg, Pokemon parentOne, Pokemon parentTwo) Calculates the egg move setdoublegetEggSize(Pokemon parentOne, Pokemon parentTwo) Calculates the new size for the Pokemon from the two parentsgetFathersTMHMTutorMoves(Stats egg, Pokemon father) Gets the father's TM, HM and Tutor movesgetFirstFourMoves(List<ImmutableAttack> masterAttackList) Gets the first four moves from the attack list givengetIVsForEgg(Pokemon parentOne, Pokemon parentTwo) Calculates the new IVs for the Pokemon from the two parentsgetNatureForEgg(Pokemon parentOne, Pokemon parentTwo) Calculates the new Nature for the Pokemon from the two parentsgetPokeBall(Pokemon parentOne, Pokemon parentTwo) Calculates the new PokeBall for the Pokemon from the two parentsgetPokemonLevelupMoves(Stats egg, Pokemon parentOne, Pokemon parentTwo) Gets the level up moves for the eggAttempts to make an egg using the two given PokemonmakeRandomEgg(Pokemon parentOne, Pokemon parentTwo) Makes a random Pokemon egg using the two parents for stats such as IVs and abilitiesbooleanshouldEggBeShiny(Pokemon parentOne, Pokemon parentTwo) Check used to determine if the child should be shiny
-
Constructor Details
-
PixelmonBreedingLogic
public PixelmonBreedingLogic()
-
-
Method Details
-
makeEgg
Description copied from interface:BreedingLogicFactoryAttempts to make an egg using the two given Pokemon- Specified by:
makeEggin interfaceBreedingLogicFactory- Parameters:
parentOne- The first parentparentTwo- The second parent- Returns:
- The potential egg
-
canBreed
Description copied from interface:BreedingLogicFactoryChecks if the two Pokemon can breed- Specified by:
canBreedin interfaceBreedingLogicFactory- Parameters:
parentOne- The first parentparentTwo- The second parent- Returns:
- true if they can breed
-
calculateForm
Description copied from interface:BreedingLogicFactoryCalculates the form of the child using the two parents- Specified by:
calculateFormin interfaceBreedingLogicFactory- Parameters:
parentOne- The first parentparentTwo- The second parentchild- The child species- Returns:
- The relevant form
-
calculatePalette
Description copied from interface:BreedingLogicFactoryCalculates the palette of the child using the two parents- Specified by:
calculatePalettein interfaceBreedingLogicFactory- Parameters:
parentOne- The first parentparentTwo- The second parentchild- The child species- Returns:
- The relevant palette
-
makeRandomEgg
Description copied from interface:BreedingLogicFactoryMakes a random Pokemon egg using the two parents for stats such as IVs and abilities- Specified by:
makeRandomEggin interfaceBreedingLogicFactory- Parameters:
parentOne- The first parentparentTwo- The second parent- Returns:
- The new Pokemon egg
-
calculateSpecies
Description copied from interface:BreedingLogicFactoryCalculates the species created by the two parent Pokemons- Specified by:
calculateSpeciesin interfaceBreedingLogicFactory- Parameters:
parentOne- The first parentparentTwo- The second parent- Returns:
- The created species
-
getIVsForEgg
Description copied from interface:BreedingLogicFactoryCalculates the new IVs for the Pokemon from the two parents- Specified by:
getIVsForEggin interfaceBreedingLogicFactory- Parameters:
parentOne- First parentparentTwo- Second parent- Returns:
- The new IVs
-
getNatureForEgg
Description copied from interface:BreedingLogicFactoryCalculates the new Nature for the Pokemon from the two parents- Specified by:
getNatureForEggin interfaceBreedingLogicFactory- Parameters:
parentOne- First parentparentTwo- Second parent- Returns:
- The new Nature
-
getPokeBall
Description copied from interface:BreedingLogicFactoryCalculates the new PokeBall for the Pokemon from the two parents- Specified by:
getPokeBallin interfaceBreedingLogicFactory- Parameters:
parentOne- First parentparentTwo- Second parent- Returns:
- The new PokeBall
-
getEggSize
Description copied from interface:BreedingLogicFactoryCalculates the new size for the Pokemon from the two parents- Specified by:
getEggSizein interfaceBreedingLogicFactory- Parameters:
parentOne- First parentparentTwo- Second parent- Returns:
- The new size
-
getEggAbility
Description copied from interface:BreedingLogicFactoryCalculates the new Ability for the Pokemon from the two parents- Specified by:
getEggAbilityin interfaceBreedingLogicFactoryparentOne- First parentparentTwo- Second parent- Returns:
- The new Ability
-
getEggAbilitySlot
public com.mojang.datafixers.util.Pair<Integer,Boolean> getEggAbilitySlot(Stats form, Pokemon parentOne, Pokemon parentTwo) Description copied from interface:BreedingLogicFactoryCalculates the new Ability slot for the Pokemon from the two parents- Specified by:
getEggAbilitySlotin interfaceBreedingLogicFactoryparentOne- First parentparentTwo- Second parent- Returns:
- The new slot and whether it inherits the hidden ability
-
shouldEggBeShiny
Description copied from interface:BreedingLogicFactoryCheck used to determine if the child should be shiny- Specified by:
shouldEggBeShinyin interfaceBreedingLogicFactory- Parameters:
parentOne- The first parentparentTwo- The second parent- Returns:
- True if shiny
-
getEggMoveset
Description copied from interface:BreedingLogicFactoryCalculates the egg move set- Specified by:
getEggMovesetin interfaceBreedingLogicFactory- Parameters:
egg- The egg's formparentOne- The first parentparentTwo- The second parent- Returns:
- The moveset of the child
-
getPokemonLevelupMoves
public List<ImmutableAttack> getPokemonLevelupMoves(Stats egg, Pokemon parentOne, Pokemon parentTwo) Description copied from interface:BreedingLogicFactoryGets the level up moves for the egg- Specified by:
getPokemonLevelupMovesin interfaceBreedingLogicFactory- Parameters:
egg- The form of the eggparentOne- The first parentparentTwo- The second parent- Returns:
- The level up moves
-
getFirstFourMoves
Description copied from interface:BreedingLogicFactoryGets the first four moves from the attack list given- Specified by:
getFirstFourMovesin interfaceBreedingLogicFactory- Parameters:
masterAttackList- The attack list- Returns:
- The move set equivalent of the attack list
-
getEggMoves
public List<ImmutableAttack> getEggMoves(Stats egg, Pokemon parent, Set<ImmutableAttack> allEggMoves) Description copied from interface:BreedingLogicFactoryGets the egg moves- Specified by:
getEggMovesin interfaceBreedingLogicFactory- Parameters:
egg- The egg's formparent- The parentallEggMoves- The child's egg moves- Returns:
- The egg moves
-
canLearnVoltTackle
Description copied from interface:BreedingLogicFactoryIf the pokemon can learn volt tackle move- Specified by:
canLearnVoltTacklein interfaceBreedingLogicFactory- Parameters:
species- The egg speciesparentOne- The first parentparentTwo- The second parent- Returns:
- True if it can learn volt tackle
-
getFathersTMHMTutorMoves
Description copied from interface:BreedingLogicFactoryGets the father's TM, HM and Tutor moves- Specified by:
getFathersTMHMTutorMovesin interfaceBreedingLogicFactory- Parameters:
egg- The eggfather- The father- Returns:
- The TM, HM and Tutor moves
-
findFather
Description copied from interface:BreedingLogicFactoryObtains the father of the two parents- Specified by:
findFatherin interfaceBreedingLogicFactory- Parameters:
parentOne- The first parentparentTwo- The second parent- Returns:
- The father
-
findMother
Description copied from interface:BreedingLogicFactoryObtains the mother of the two parents- Specified by:
findMotherin interfaceBreedingLogicFactory- Parameters:
parentOne- The first parentparentTwo- The second parent- Returns:
- The mother
-
checkIncense
@SafeVarargs public final boolean checkIncense(net.minecraft.world.item.Item itemTypeParent, net.minecraft.world.item.Item itemTypeOther, Pokemon parentForEggLine, net.minecraft.world.item.Item neededItem, RegistryValue<Species> baby, RegistryValue<Species>... parents) Description copied from interface:BreedingLogicFactoryChecks the incense- Specified by:
checkIncensein interfaceBreedingLogicFactory- Parameters:
itemTypeParent- The parent's itemitemTypeOther- The other itemparentForEggLine- The egg line itemneededItem- The required itembaby- The baby typeparents- The parents types- Returns:
- If the incense is used
-