Class LivingEquipmentChangeEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.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 in LivingEntity.tick().
This also includes entities joining the World, as well as being cloned.
This event is fired on server-side only.

slot contains the affected EquipmentSlot.
from contains the ItemStack that was equipped previously.
to contains the ItemStack that is equipped now.

This event is not
invalid reference
ICancellableEvent
.

This event does not have a result.
invalid reference
HasResult


This event is fired on the NeoForge.EVENT_BUS.
  • Field Details

    • slot

      private final net.minecraft.world.entity.EquipmentSlot slot
    • from

      private final net.minecraft.world.item.ItemStack from
    • to

      private final net.minecraft.world.item.ItemStack to
  • Constructor Details

    • LivingEquipmentChangeEvent

      public LivingEquipmentChangeEvent(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.entity.EquipmentSlot slot, net.minecraft.world.item.ItemStack from, net.minecraft.world.item.ItemStack to)
  • Method Details

    • getSlot

      public net.minecraft.world.entity.EquipmentSlot getSlot()
    • getFrom

      public net.minecraft.world.item.ItemStack getFrom()
    • getTo

      public net.minecraft.world.item.ItemStack getTo()