public class EntityBreedEvent extends EntityEvent implements Cancellable
Event.Result
entity
Constructor and Description |
---|
EntityBreedEvent(LivingEntity child,
LivingEntity mother,
LivingEntity father,
LivingEntity breeder,
ItemStack bredWith,
int experience) |
Modifier and Type | Method and Description |
---|---|
ItemStack |
getBredWith()
The ItemStack that was used to initiate breeding, if present.
|
LivingEntity |
getBreeder()
Gets the Entity responsible for breeding.
|
LivingEntity |
getEntity()
Returns the Entity involved in this event
|
int |
getExperience()
Get the amount of experience granted by breeding.
|
LivingEntity |
getFather()
Gets the other parent of the newly born entity.
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
LivingEntity |
getMother()
Gets the parent creating this entity.
|
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event.
|
void |
setExperience(int experience)
Set the amount of experience granted by breeding.
|
getEntityType
getEventName, isAsynchronous
public EntityBreedEvent(LivingEntity child, LivingEntity mother, LivingEntity father, LivingEntity breeder, ItemStack bredWith, int experience)
public LivingEntity getEntity()
EntityEvent
getEntity
in class EntityEvent
public LivingEntity getMother()
public LivingEntity getFather()
public LivingEntity getBreeder()
public ItemStack getBredWith()
public int getExperience()
public void setExperience(int experience)
experience
- experience amountpublic boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this eventpublic HandlerList getHandlers()
getHandlers
in class Event
public static HandlerList getHandlerList()
Copyright © 2017. All rights reserved.