Class DayCareEvent.PreEggCalculate
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent.PreEggCalculate
- All Implemented Interfaces:
- net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
- DayCareEvent
public static class DayCareEvent.PreEggCalculate
extends DayCareEvent
implements net.neoforged.bus.api.ICancellableEvent
This event is fired just before the response packet is sent to the client with the calculated child
 Cancelling this will prevent a response (causing the event to be fired more times as the client continues to request
 a response)
- 
Nested Class SummaryNested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.daycare.event.DayCareEventDayCareEvent.HourGlassUsed, DayCareEvent.PostCollect, DayCareEvent.PostConditionStatusUpdate, DayCareEvent.PostDurationCalculate, DayCareEvent.PostEggCalculate, DayCareEvent.PostPokemonAdd, DayCareEvent.PostTimerBegin, DayCareEvent.PreCollect, DayCareEvent.PreConditionStatusUpdate, DayCareEvent.PreDurationCalculate, DayCareEvent.PreEggCalculate, DayCareEvent.PrePokemonAdd, DayCareEvent.PreTimerBegin, DayCareEvent.TimerComplete
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionPreEggCalculate(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, Pokemon parentOne, Pokemon parentTwo, Pokemon calculatedChild, boolean childExists, boolean showChild, boolean showPotentialShiny) 
- 
Method SummaryModifier and TypeMethodDescriptionGets the child calculated by theBreedingLogicProxyGets the "parent one" used in the calculationGets the "parent two" used in the calculationbooleanIf a child can be created from these parentsbooleanSets if the child can be seenbooleanSets if the child can be seenvoidsetCalculatedChild(Pokemon calculatedChild) Sets the childvoidsetChildExists(boolean childExists) Sets if a child can be created or notvoidsetShowChild(boolean showChild) Sets if the child should be shown in the GUIvoidsetShowPotentialShiny(boolean showPotentialShiny) Sets if a shiny child should be shown in the GUIMethods inherited from class com.pixelmonmod.pixelmon.api.daycare.event.DayCareEventgetDayCare, getParty, getPlayerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEventisCanceled, setCanceled
- 
Field Details- 
parentOne
- 
parentTwo
- 
calculatedChild
- 
childExistsprotected boolean childExists
- 
showChildprotected boolean showChild
- 
showPotentialShinyprotected boolean showPotentialShiny
 
- 
- 
Constructor Details- 
PreEggCalculatepublic PreEggCalculate(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, Pokemon parentOne, Pokemon parentTwo, Pokemon calculatedChild, boolean childExists, boolean showChild, boolean showPotentialShiny) 
 
- 
- 
Method Details- 
getParentOneGets the "parent one" used in the calculation- Returns:
- The first parent
 
- 
getParentTwoGets the "parent two" used in the calculation- Returns:
- The second parent
 
- 
getCalculatedChildGets the child calculated by theBreedingLogicProxy- Returns:
- The child
 
- 
setCalculatedChildSets the child- Parameters:
- calculatedChild- The new child
 
- 
isChildExistspublic boolean isChildExists()If a child can be created from these parents- Returns:
- If a child can be created
 
- 
setChildExistspublic void setChildExists(boolean childExists) Sets if a child can be created or not- Parameters:
- childExists- If the child can be created
 
- 
isShowChildpublic boolean isShowChild()Sets if the child can be seen- Returns:
- true if the child is shown then return true
 
- 
setShowChildpublic void setShowChild(boolean showChild) Sets if the child should be shown in the GUI- Parameters:
- showChild- True if you want to show the child
 
- 
isShowPotentialShinypublic boolean isShowPotentialShiny()Sets if the child can be seen- Returns:
- true if the child is shown then return true
 
- 
setShowPotentialShinypublic void setShowPotentialShiny(boolean showPotentialShiny) Sets if a shiny child should be shown in the GUI- Parameters:
- showPotentialShiny- True if you want to show shiny children
 
 
-