类 ItemExpireEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.item.ItemEvent
net.minecraftforge.event.entity.item.ItemExpireEvent
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.
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing
从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
字段概要
字段 -
构造器概要
构造器构造器说明ItemExpireEvent
(ItemEntity entityItem, int extraLife) Creates a new event for an expiring EntityItem. -
方法概要
从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
extraLife
private int extraLife
-
-
构造器详细资料
-
ItemExpireEvent
Creates a new event for an expiring EntityItem.- 参数:
entityItem
- The EntityItem being deleted.extraLife
- The amount of time to be added to this entities lifespan if the event is canceled.
-
-
方法详细资料
-
getExtraLife
public int getExtraLife() -
setExtraLife
public void setExtraLife(int extraLife)
-