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
LivingEquipmentChangeEvent
is 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.
slot
contains the affectedEntityEquipmentSlot
.
from
contains theItemStack
that was equipped previously.
to
contains theItemStack
that 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 ItemStack
getFrom()
EquipmentSlotType
getSlot()
ItemStack
getTo()
-
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()
-
-