public class BabyEntitySpawnEvent extends Event
@Cancelable setChild(EntityAgeable) 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.Cancelable.HasResultMinecraftForge.EVENT_BUS.Event.HasResult, Event.Result| Modifier and Type | Field and Description |
|---|---|
private EntityPlayer |
causedByPlayer |
private EntityAgeable |
child |
private EntityLiving |
parentA |
private EntityLiving |
parentB |
| Constructor and Description |
|---|
BabyEntitySpawnEvent(EntityLiving parentA,
EntityLiving parentB,
EntityAgeable proposedChild) |
| Modifier and Type | Method and Description |
|---|---|
EntityPlayer |
getCausedByPlayer() |
EntityAgeable |
getChild() |
EntityLiving |
getParentA() |
EntityLiving |
getParentB() |
void |
setChild(EntityAgeable proposedChild) |
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setupprivate final EntityLiving parentA
private final EntityLiving parentB
private final EntityPlayer causedByPlayer
private EntityAgeable child
public BabyEntitySpawnEvent(EntityLiving parentA, EntityLiving parentB, @Nullable EntityAgeable proposedChild)
public EntityLiving getParentA()
public EntityLiving getParentB()
@Nullable public EntityPlayer getCausedByPlayer()
@Nullable public EntityAgeable getChild()
public void setChild(EntityAgeable proposedChild)