Class DayCareEvent.PreConditionStatusUpdate

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent.PreConditionStatusUpdate
Enclosing class:
DayCareEvent

public static class DayCareEvent.PreConditionStatusUpdate extends DayCareEvent
The event fired just before the condition status response packet is sent Cancelling will prevent the response from happening (will look weird on the client's UI)
  • Field Details

    • box

      protected final DayCareBox box
    • condition

      protected DayCareCondition condition
    • requirement

      protected DayCareRequirement requirement
    • canConsume

      protected boolean canConsume
    • errorMessage

      protected net.minecraft.network.chat.Component errorMessage
  • Constructor Details

  • Method Details

    • getBox

      public DayCareBox getBox()
      Gets the box this is in relation to
      Returns:
      The box
    • getCondition

      public DayCareCondition getCondition()
      Gets the condition being used
      Returns:
      The condition
    • setCondition

      public void setCondition(DayCareCondition condition)
      Sets the condition being used
      Parameters:
      condition - The condition
    • getRequirement

      public DayCareRequirement getRequirement()
      Gets the requirement being used
      Returns:
      The daycare requirement being used
    • setRequirement

      public void setRequirement(DayCareRequirement requirement)
      Sets the requirement being used
      Parameters:
      requirement - The new requirement being used
    • isCanConsume

      public boolean isCanConsume()
      If the inventory can consume the requirement (i.e. they have met the requirement condition)
      Returns:
      if they can consume the requirement
    • setCanConsume

      public void setCanConsume(boolean canConsume)
      Sets if they can meet the requirement
      Parameters:
      canConsume - True if they can meet the requirement
    • getErrorMessage

      public net.minecraft.network.chat.Component getErrorMessage()
      Gets the error message to display to the client Only displayed if isCanConsume() is false
      Returns:
      The error message
    • setErrorMessage

      public void setErrorMessage(net.minecraft.network.chat.Component errorMessage)
      Sets the error message to display to the client Only displayed if isCanConsume() is false
      Parameters:
      errorMessage - The error message