Class DayCareEvent.PreDurationCalculate
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent.PreDurationCalculate
- Enclosing class:
- DayCareEvent
Fired just before the duration of a day care box is set
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
-
Constructor Summary
ConstructorDescriptionPreDurationCalculate
(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, DayCareBox box, long duration) -
Method Summary
Modifier and TypeMethodDescriptiongetBox()
Gets the day care boxlong
Gets the calculated durationvoid
setDuration
(long duration) Sets the calculated durationMethods 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
-
duration
protected long duration
-
-
Constructor Details
-
PreDurationCalculate
public PreDurationCalculate(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, DayCareBox box, long duration)
-
-
Method Details
-
getBox
Gets the day care box- Returns:
- The box
-
getDuration
public long getDuration()Gets the calculated duration- Returns:
- The calculated duration
-
setDuration
public void setDuration(long duration) Sets the calculated duration- Parameters:
duration
-
-