Cancellablepublic class EntityBreedEvent extends EntityEvent implements Cancellable
Event.Resultentity| Constructor | Description |
|---|---|
EntityBreedEvent(LivingEntity child,
LivingEntity mother,
LivingEntity father,
LivingEntity breeder,
ItemStack bredWith,
int experience) |
| Modifier and Type | Method | 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.
|
getEntityTypegetEventName, isAsynchronouspublic EntityBreedEvent(LivingEntity child, LivingEntity mother, LivingEntity father, LivingEntity breeder, ItemStack bredWith, int experience)
public LivingEntity getEntity()
EntityEventgetEntity in class EntityEventpublic LivingEntity getMother()
public LivingEntity getFather()
public LivingEntity getBreeder()
public ItemStack getBredWith()
public int getExperience()
public void setExperience(int experience)
experience - experience amountpublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this eventpublic HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
Copyright © 2018. All rights reserved.