Class DayCareEvent.PrePokemonAdd
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent.PrePokemonAdd
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
DayCareEvent
public static class DayCareEvent.PrePokemonAdd
extends DayCareEvent
implements net.neoforged.bus.api.ICancellableEvent
Event fired just before a Pokemon is added to the box
Cancelling will not add the Pokemon to the box and not send a reply to the client (basically cancelling the click)
-
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
ConstructorsConstructorDescriptionPrePokemonAdd(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, Pokemon parentOne, Pokemon parentTwo, Pokemon childCreated) -
Method Summary
Modifier and TypeMethodDescriptionGets the child that will be createdGets the first parentGets the second parentvoidsetChildCreated(Pokemon childCreated) Sets the child that will be created (will be turned into an egg if not)voidsetParentOne(Pokemon parentOne) Sets the first parentvoidsetParentTwo(Pokemon parentTwo) Sets the second parentMethods inherited from class com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent
getDayCare, getParty, getPlayerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Field Details
-
parentOne
-
parentTwo
-
childCreated
-
-
Constructor Details
-
PrePokemonAdd
public PrePokemonAdd(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, Pokemon parentOne, Pokemon parentTwo, Pokemon childCreated)
-
-
Method Details
-
getParentOne
Gets the first parent- Returns:
- the first parent
-
setParentOne
Sets the first parent- Parameters:
parentOne- The first parent
-
getParentTwo
Gets the second parent- Returns:
- The second parent
-
setParentTwo
Sets the second parent- Parameters:
parentTwo- The second parent
-
getChildCreated
Gets the child that will be created- Returns:
- The child created
-
setChildCreated
Sets the child that will be created (will be turned into an egg if not)- Parameters:
childCreated- The child created
-