Class DayCareEvent.PreTimerBegin
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent.PreTimerBegin
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
DayCareEvent
public static class DayCareEvent.PreTimerBegin
extends DayCareEvent
implements net.neoforged.bus.api.ICancellableEvent
This event is fired just before the breeding timer begins
Cancelling this will prevent it from beginning
-
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
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPreTimerBegin
(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, DayCareBox box, long duration) -
Method Summary
Modifier and TypeMethodDescriptiongetBox()
Gets the box about to beginlong
The duration in milliseconds the timer will lastvoid
setDuration
(long duration) Sets the duration in millisecondsMethods inherited from class com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent
getDayCare, getParty, getPlayer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Field Details
-
box
-
duration
protected long duration
-
-
Constructor Details
-
PreTimerBegin
public PreTimerBegin(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, DayCareBox box, long duration)
-
-
Method Details
-
getBox
Gets the box about to begin- Returns:
- The box
-
getDuration
public long getDuration()The duration in milliseconds the timer will last- Returns:
- The duration
-
setDuration
public void setDuration(long duration) Sets the duration in milliseconds- Parameters:
duration
- The duration
-