类 EntityEvent.EnteringSection
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.EntityEvent.EnteringSection
- 封闭类:
EntityEvent
This event is fired on server and client after an Entity has entered a different section.
Sections are 16x16x16 block grids of the world.
This event does not fire when a new entity is spawned, only when an entity moves from one section to another one. Use
This event is not
This event does not have a result.
This event is fired on the
Sections are 16x16x16 block grids of the world.
This event does not fire when a new entity is spawned, only when an entity moves from one section to another one. Use
EntityJoinLevelEvent
to detect new entities joining the world.
This event is not
Cancelable
.This event does not have a result.
Event.HasResult
This event is fired on the
MinecraftForge.EVENT_BUS
.-
嵌套类概要
从类继承的嵌套类/接口 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
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean
Whether the chunk has changed as part of this event.long
A packed version of the new section's position.long
A packed version of the old section's position.从类继承的方法 net.minecraftforge.event.entity.EntityEvent
getEntity
从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
packedOldPos
private final long packedOldPos -
packedNewPos
private final long packedNewPos
-
-
构造器详细资料
-
EnteringSection
-
-
方法详细资料
-
getPackedOldPos
public long getPackedOldPos()A packed version of the old section's position. This is to be used with the various methods inSectionPos
, such asSectionPos.of(long)
orSectionPos.x(long)
to avoid allocation.- 返回:
- the packed position of the old section
-
getPackedNewPos
public long getPackedNewPos()A packed version of the new section's position. This is to be used with the various methods inSectionPos
, such asSectionPos.of(long)
orSectionPos.x(long)
to avoid allocation.- 返回:
- the packed position of the new section
-
getOldPos
- 返回:
- the position of the old section
-
getNewPos
- 返回:
- the position of the new section
-
didChunkChange
public boolean didChunkChange()Whether the chunk has changed as part of this event. If this method returns false, only the Y position of the section has changed.
-