类 ChunkEvent.Load
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.LevelEvent
net.neoforged.neoforge.event.level.ChunkEvent<LevelChunk>
net.neoforged.neoforge.event.level.ChunkEvent.Load
- 封闭类:
ChunkEvent<T extends ChunkAccess>
This event is fired after Minecraft loads a
LevelChunk
into the level, on both the client and server.
Specifically, this is fired during chunk loading in ChunkStatusTasks.full(net.minecraft.world.level.chunk.status.WorldGenContext, net.minecraft.world.level.chunk.status.ChunkStep, net.minecraft.util.StaticCache2D<net.minecraft.server.level.GenerationChunkHolder>, net.minecraft.world.level.chunk.ChunkAccess)
, and when the client receives a chunk from the server.
Note: On the server, this event is fired before the underlying LevelChunk
is promoted to ChunkStatus.FULL
.
Interactions with the level
must be delayed until the next game tick to prevent deadlocking the game.
-
嵌套类概要
从类继承的嵌套类/接口 net.neoforged.neoforge.event.level.ChunkEvent
ChunkEvent.Load, ChunkEvent.Unload
从类继承的嵌套类/接口 net.neoforged.neoforge.event.level.LevelEvent
LevelEvent.CreateSpawnPosition, LevelEvent.PotentialSpawns, LevelEvent.Save
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean
返回 true if this is a newly-generated chunk, instead of one loaded from disk。从类继承的方法 net.neoforged.neoforge.event.level.ChunkEvent
getChunk
从类继承的方法 net.neoforged.neoforge.event.level.LevelEvent
getLevel
-
字段详细资料
-
newChunk
private final boolean newChunk
-
-
构造器详细资料
-
Load
-
-
方法详细资料
-
isNewChunk
public boolean isNewChunk()返回 true if this is a newly-generated chunk, instead of one loaded from disk。- 返回:
- true if this is a newly-generated chunk, instead of one loaded from disk
- API Note:
- This method only has meaning on the server, since the client does not generate chunks.
-