Class BabyEntitySpawnEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.living.BabyEntitySpawnEvent
public class BabyEntitySpawnEvent
extends net.minecraftforge.eventbus.api.Event
BabyEntitySpawnEvent is fired just before a baby entity is about to be spawned.
Parents will have disengaged their relationship. {@link @Cancelable}
It is possible to change the child completely by using
This event is fired from
This event is
If this event is canceled, the child Entity is not added to the world, and the parents
will no longer attempt to mate.
This event does not have a result.
This event is fired on the
Parents will have disengaged their relationship. {@link @Cancelable}
It is possible to change the child completely by using
setChild(EntityAgeable)
This event is fired from
EntityAIMate#spawnBaby()
and EntityAIVillagerMate#giveBirth()
parentA
contains the initiating parent entity.parentB
contains the secondary parent entity.causedByPlayer
contains the player responsible for the breading (if applicable).child
contains the child that will be spawned.This event is
Cancelable
.If this event is canceled, the child Entity is not added to the world, and the parents
will no longer attempt to mate.
This event does not have a result.
Event.HasResult
This event is fired on the
MinecraftForge.EVENT_BUS
.-
Nested Class Summary
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 TypeFieldDescriptionprivate final PlayerEntity
private AgeableEntity
private final MobEntity
private final MobEntity
-
Constructor Summary
ConstructorDescriptionBabyEntitySpawnEvent
(MobEntity parentA, MobEntity parentB, AgeableEntity proposedChild) -
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
parentA
-
parentB
-
causedByPlayer
-
child
-
-
Constructor Details
-
BabyEntitySpawnEvent
public BabyEntitySpawnEvent(MobEntity parentA, MobEntity parentB, @Nullable AgeableEntity proposedChild)
-
-
Method Details
-
getParentA
-
getParentB
-
getCausedByPlayer
-
getChild
-
setChild
-