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
LivingEquipmentChangeEvent
is fired when the Equipment of a Entity changes. This event is fired whenever changes in Equipment are detected in
EntityLivingBase#onUpdate()
. This also includes entities joining the World, as well as being cloned.
This event is fired on server-side only.
slot
contains the affected EntityEquipmentSlot
. from
contains the ItemStack
that was equipped previously. to
contains the ItemStack
that is equipped now. This event is not
Cancelable
. This event does not have a result.
Event.HasResult
This event is fired on the
MinecraftForge.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
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLivingEquipmentChangeEvent
(LivingEntity entity, EquipmentSlotType slot, ItemStack from, ItemStack to) -
Method Summary
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
slot
-
from
-
to
-
-
Constructor Details
-
LivingEquipmentChangeEvent
public LivingEquipmentChangeEvent(LivingEntity entity, EquipmentSlotType slot, @Nonnull ItemStack from, @Nonnull ItemStack to)
-
-
Method Details
-
getSlot
-
getFrom
-
getTo
-