Class DayCareEvent.PreCollect
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent
com.pixelmonmod.pixelmon.api.daycare.event.DayCareEvent.PreCollect
- Enclosing class:
- DayCareEvent
Event fired just before the player collects the egg (and parents) from the DayCare
If cancelled nothing happens (effectively cancelling the user's UI 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
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
ConstructorDescriptionPreCollect
(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, Pokemon parentOne, Pokemon parentTwo, Pokemon childGiven) -
Method Summary
Modifier and TypeMethodDescriptionGets the child that will be createdGets the first parentGets the second parentvoid
setAddToHistory
(boolean addToHistory) Sets if the child given should be added to the player's breeding history Defaults to truevoid
setChildGiven
(Pokemon childCreated) Sets the child that will be givenvoid
setParentOne
(Pokemon parentOne) Sets the first parent Setting to null means no parent will be returnedvoid
setParentTwo
(Pokemon parentTwo) Sets the second parent Setting to null means no parent will be returnedboolean
If the child given should be added to the player's breeding history Defaults to trueMethods 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
-
parentOne
-
parentTwo
-
childGiven
-
addToHistory
protected boolean addToHistory
-
-
Constructor Details
-
PreCollect
public PreCollect(net.minecraft.server.level.ServerPlayer player, PlayerPartyStorage party, Pokemon parentOne, Pokemon parentTwo, Pokemon childGiven)
-
-
Method Details
-
getParentOne
Gets the first parent- Returns:
- the first parent
-
setParentOne
Sets the first parent Setting to null means no parent will be returned- Parameters:
parentOne
- The first parent
-
getParentTwo
Gets the second parent- Returns:
- The second parent
-
setParentTwo
Sets the second parent Setting to null means no parent will be returned- Parameters:
parentTwo
- The second parent
-
getChildGiven
Gets the child that will be created- Returns:
- The child given
-
setChildGiven
Sets the child that will be given- Parameters:
childCreated
- The child given
-
shouldAddToHistory
public boolean shouldAddToHistory()If the child given should be added to the player's breeding history Defaults to true- Returns:
- If true it will be added to their history
-
setAddToHistory
public void setAddToHistory(boolean addToHistory) Sets if the child given should be added to the player's breeding history Defaults to true- Parameters:
addToHistory
- If true it will be added to their history
-