Interface ChunkEvent.LoadData

Enclosing interface:
ChunkEvent

public static interface ChunkEvent.LoadData
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    load(net.minecraft.world.level.chunk.ChunkAccess chunk, @Nullable net.minecraft.server.level.ServerLevel level, net.minecraft.nbt.CompoundTag nbt)
    Invoked just before a chunk's data is fully read.
  • Method Details

    • load

      void load(net.minecraft.world.level.chunk.ChunkAccess chunk, @Nullable @Nullable net.minecraft.server.level.ServerLevel level, net.minecraft.nbt.CompoundTag nbt)
      Invoked just before a chunk's data is fully read. You can read out your own data from the CompoundTag parameter, when you have saved one before. Equivalent to Forge's ChunkDataEvent.Load.
      Parameters:
      chunk - The chunk that is loaded.
      level - The level the chunk is in, may be null.
      nbt - The chunk data that was read from the save file.