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

public static class DayCareEvent.PreEggCalculate extends 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)
  • Field Details

    • parentOne

      protected final Pokemon parentOne
    • parentTwo

      protected final Pokemon parentTwo
    • calculatedChild

      protected Pokemon 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

      public Pokemon getParentOne()
      Gets the "parent one" used in the calculation
      Returns:
      The first parent
    • getParentTwo

      public Pokemon getParentTwo()
      Gets the "parent two" used in the calculation
      Returns:
      The second parent
    • getCalculatedChild

      public Pokemon getCalculatedChild()
      Gets the child calculated by the BreedingLogicProxy
      Returns:
      The child
    • setCalculatedChild

      public void setCalculatedChild(Pokemon calculatedChild)
      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