Class ItemExpireEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.item.ItemEvent
net.neoforged.neoforge.event.entity.item.ItemExpireEvent
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
Event that is fired when an EntityItem's age has reached its maximum
lifespan. Canceling this event will prevent the EntityItem from being
flagged as dead, thus staying it's removal from the world. If canceled
it will add more time to the entities life equal to extraLife.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionItemExpireEvent
(ItemEntity entityItem, int extraLife) Creates a new event for an expiring EntityItem. -
Method Summary