类 EntityJoinLevelEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.EntityJoinLevelEvent
This event is fired whenever an
Entity
joins a Level
.
This event is fired whenever an entity is added to a level in LevelWriter.addFreshEntity(Entity)
and PersistentEntitySectionManager#addNewEntity(Entity, boolean)
.
Note: This event may be called before the underlying LevelChunk
is promoted to
.
You will cause chunk loading deadlocks if you do not delay your world interactions.
引用无效
ChunkStatus#FULL
This event is cancellable and does not have a result. If the event is canceled, the entity will not be added to the level.
This event is fired on the main Forge event bus on both logical sides.
-
嵌套类概要
从类继承的嵌套类/接口 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
-
字段概要
字段 -
构造器概要
构造器构造器说明EntityJoinLevelEvent
(Entity entity, Level level) EntityJoinLevelEvent
(Entity entity, Level level, boolean loadedFromDisk) -
方法概要
从类继承的方法 net.minecraftforge.event.entity.EntityEvent
getEntity
从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
level
-
loadedFromDisk
private final boolean loadedFromDisk
-
-
构造器详细资料
-
EntityJoinLevelEvent
-
EntityJoinLevelEvent
-
-
方法详细资料
-
getLevel
返回 the level that the entity is set to join。- 返回:
- the level that the entity is set to join
-
loadedFromDisk
public boolean loadedFromDisk()- 返回:
true
if the entity was loaded from disk,false
otherwise. On the logical client, this will always returnfalse
.
-