Interface ChunkEvent.SaveData

Enclosing interface:
ChunkEvent

public static interface ChunkEvent.SaveData
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    save(net.minecraft.world.level.chunk.ChunkAccess chunk, net.minecraft.server.level.ServerLevel level, net.minecraft.nbt.CompoundTag nbt)
    Invoked when a chunk's data is saved, just before the data is written.
  • Method Details

    • save

      void save(net.minecraft.world.level.chunk.ChunkAccess chunk, net.minecraft.server.level.ServerLevel level, net.minecraft.nbt.CompoundTag nbt)
      Invoked when a chunk's data is saved, just before the data is written. Add your own data to the CompoundTag parameter to get your data saved as well. Equivalent to Forge's ChunkDataEvent.Save.
      Parameters:
      chunk - The chunk that is saved.
      level - The level the chunk is in.
      nbt - The chunk data that is written to the save file.