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.
|
getEntityTypecallEvent, getEventName, isAsynchronouspublic EntityBreedEvent(@NotNull
LivingEntity child,
@NotNull
LivingEntity mother,
@NotNull
LivingEntity father,
@Nullable
LivingEntity breeder,
@Nullable
ItemStack bredWith,
int experience)
@NotNull public LivingEntity getEntity()
EntityEventgetEntity in class EntityEvent@NotNull public LivingEntity getMother()
@NotNull public LivingEntity getFather()
@Nullable public LivingEntity getBreeder()
@Nullable 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 event@NotNull public HandlerList getHandlers()
getHandlers in class Event@NotNull public static HandlerList getHandlerList()
Copyright © 2020. All rights reserved.