Class LivingEquipmentChangeEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.living.LivingEvent
-
- net.minecraftforge.event.entity.living.LivingEquipmentChangeEvent
-
public class LivingEquipmentChangeEvent extends LivingEvent
LivingEquipmentChangeEventis fired when the Equipment of a Entity changes.
This event is fired whenever changes in Equipment are detected inEntityLivingBase#onUpdate().
This also includes entities joining the World, as well as being cloned.
This event is fired on server-side only.
slotcontains the affectedEntityEquipmentSlot.
fromcontains theItemStackthat was equipped previously.
tocontains theItemStackthat is equipped now.
This event is notCancelable.
This event does not have a result.Event.HasResult
This event is fired on theMinecraftForge.EVENT_BUS.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Constructor Summary
Constructors Constructor Description LivingEquipmentChangeEvent(LivingEntity entity, EquipmentSlotType slot, ItemStack from, ItemStack to)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemStackgetFrom()EquipmentSlotTypegetSlot()ItemStackgetTo()-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
slot
private final EquipmentSlotType slot
-
from
private final ItemStack from
-
to
private final ItemStack to
-
-
Constructor Detail
-
LivingEquipmentChangeEvent
public LivingEquipmentChangeEvent(LivingEntity entity, EquipmentSlotType slot, @Nonnull ItemStack from, @Nonnull ItemStack to)
-
-
Method Detail
-
getSlot
public EquipmentSlotType getSlot()
-
getFrom
@Nonnull public ItemStack getFrom()
-
getTo
@Nonnull public ItemStack getTo()
-
-