Class DayCareEvent.PostConditionStatusUpdate
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent.PostConditionStatusUpdate
- Enclosing class:
- DayCareEvent
The event fired just after the condition status response packet is sent
This is not cancellable
-
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
Modifier and TypeFieldDescriptionprotected final DayCareBox
protected final boolean
protected final DayCareCondition
protected final net.minecraft.network.chat.Component
protected final DayCareRequirement
-
Constructor Summary
ConstructorDescriptionPostConditionStatusUpdate
(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, DayCareBox box, DayCareCondition condition, DayCareRequirement requirement, boolean canConsume, net.minecraft.network.chat.Component errorMessage) -
Method Summary
Modifier and TypeMethodDescriptiongetBox()
Gets the box this is in relation toGets the condition being usednet.minecraft.network.chat.Component
Gets the error message to display to the client Only displayed ifDayCareEvent.PreConditionStatusUpdate.isCanConsume()
is falseGets the requirement being usedboolean
If the inventory can consume the requirement (i.e.Methods 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
-
box
-
condition
-
requirement
-
canConsume
protected final boolean canConsume -
errorMessage
protected final net.minecraft.network.chat.Component errorMessage
-
-
Constructor Details
-
PostConditionStatusUpdate
public PostConditionStatusUpdate(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, DayCareBox box, DayCareCondition condition, DayCareRequirement requirement, boolean canConsume, net.minecraft.network.chat.Component errorMessage)
-
-
Method Details
-
getBox
Gets the box this is in relation to- Returns:
- The box
-
getCondition
Gets the condition being used- Returns:
- The condition
-
getRequirement
Gets the requirement being used- Returns:
- The daycare 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
-
getErrorMessage
public net.minecraft.network.chat.Component getErrorMessage()Gets the error message to display to the client Only displayed ifDayCareEvent.PreConditionStatusUpdate.isCanConsume()
is false- Returns:
- The error message
-