public class LivingEquipmentChangeEvent extends LivingEvent
LivingEquipmentChangeEvent
is fired when the Equipment of a Entity changes. EntityLivingBase.onUpdate()
. slot
contains the affected EntityEquipmentSlot
. from
contains the ItemStack
that was equipped previously. to
contains the ItemStack
that is equipped now. Cancelable
. HasResult
MinecraftForge.EVENT_BUS
.LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Event.HasResult, Event.Result
Modifier and Type | Field and Description |
---|---|
private ItemStack |
from |
private EntityEquipmentSlot |
slot |
private ItemStack |
to |
Constructor and Description |
---|
LivingEquipmentChangeEvent(EntityLivingBase entity,
EntityEquipmentSlot slot,
ItemStack from,
ItemStack to) |
Modifier and Type | Method and Description |
---|---|
ItemStack |
getFrom() |
EntityEquipmentSlot |
getSlot() |
ItemStack |
getTo() |
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
private final EntityEquipmentSlot slot
private final ItemStack from
private final ItemStack to
public LivingEquipmentChangeEvent(EntityLivingBase entity, EntityEquipmentSlot slot, @Nonnull ItemStack from, @Nonnull ItemStack to)
public EntityEquipmentSlot getSlot()
@Nonnull public ItemStack getFrom()
@Nonnull public ItemStack getTo()