Class DayCareEvent.PreEggCalculate
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent.PreEggCalculate
- Enclosing class:
- DayCareEvent
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 Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent
DayCareEvent.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
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPreEggCalculate
(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, Pokemon parentOne, Pokemon parentTwo, Pokemon calculatedChild, boolean childExists, boolean showChild, boolean showPotentialShiny) -
Method Summary
Modifier and TypeMethodDescriptionGets the child calculated by theBreedingLogicProxy
Gets the "parent one" used in the calculationGets the "parent two" used in the calculationboolean
If a child can be created from these parentsboolean
Sets if the child can be seenboolean
Sets if the child can be seenvoid
setCalculatedChild
(Pokemon calculatedChild) Sets the childvoid
setChildExists
(boolean childExists) Sets if a child can be created or notvoid
setShowChild
(boolean showChild) Sets if the child should be shown in the GUIvoid
setShowPotentialShiny
(boolean showPotentialShiny) Sets if a shiny child should be shown in the GUIMethods inherited from class com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent
getDayCare, getParty, getPlayer
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
parentOne
-
parentTwo
-
calculatedChild
-
childExists
protected boolean childExists -
showChild
protected boolean showChild -
showPotentialShiny
protected boolean showPotentialShiny
-
-
Constructor Details
-
PreEggCalculate
public PreEggCalculate(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, Pokemon parentOne, Pokemon parentTwo, Pokemon calculatedChild, boolean childExists, boolean showChild, boolean showPotentialShiny)
-
-
Method Details
-
getParentOne
Gets the "parent one" used in the calculation- Returns:
- The first parent
-
getParentTwo
Gets the "parent two" used in the calculation- Returns:
- The second parent
-
getCalculatedChild
Gets the child calculated by theBreedingLogicProxy
- Returns:
- The child
-
setCalculatedChild
Sets the child- Parameters:
calculatedChild
- The new child
-
isChildExists
public boolean isChildExists()If a child can be created from these parents- Returns:
- If a child can be created
-
setChildExists
public void setChildExists(boolean childExists) Sets if a child can be created or not- Parameters:
childExists
- If the child can be created
-
isShowChild
public boolean isShowChild()Sets if the child can be seen- Returns:
- true if the child is shown then return true
-
setShowChild
public void setShowChild(boolean showChild) Sets if the child should be shown in the GUI- Parameters:
showChild
- True if you want to show the child
-
isShowPotentialShiny
public boolean isShowPotentialShiny()Sets if the child can be seen- Returns:
- true if the child is shown then return true
-
setShowPotentialShiny
public 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
-