类 ChunkEvent.Load

java.lang.Object
net.neoforged.bus.api.Event
封闭类:
ChunkEvent<T extends ChunkAccess>

public static class ChunkEvent.Load extends ChunkEvent<LevelChunk>
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.

  • 字段详细资料

    • newChunk

      private final boolean newChunk
  • 构造器详细资料

    • Load

      @Internal public Load(LevelChunk chunk, boolean newChunk)
  • 方法详细资料

    • 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.