001    package net.minecraftforge.event.entity.item;
002    
003    import net.minecraft.entity.item.EntityItem;
004    import net.minecraftforge.event.Cancelable;
005    import net.minecraftforge.event.entity.EntityEvent;
006    
007    /**
008     * Event that is fired when an EntityItem's age has reached its maximum
009     * lifespan. Canceling this event will prevent the EntityItem from being
010     * flagged as dead, thus staying it's removal from the world. If canceled
011     * it will add more time to the entitie's life equal to extraLife.
012     */
013    @Cancelable
014    public class ItemExpireEvent extends ItemEvent
015    {
016    
017        public int extraLife;
018    
019        /**
020         * Creates a new event for an expiring EntityItem.
021         * 
022         * @param entityItem The EntityItem being deleted.
023         * @param extraLife The amount of time to be added to this entities lifespan if the event is canceled.
024         */
025        public ItemExpireEvent(EntityItem entityItem, int extraLife)
026        {
027            super(entityItem);
028            this.extraLife = extraLife;
029        }
030    }