Raids.dat format

Minecraft Wiki article. Categories: Java_Edition, Upcoming, Java_Edition_upcoming_tag, Java_Edition_technical, Development, Illager_mechanics

📌 Mirrored from Minecraft Wiki

This article is reproduced from Raids.dat format on the Minecraft Wiki. Mirrored from revision 3682035. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.

This feature is exclusive to Java Edition.
 

The raids.dat file located in the data folder of every Minecraft level is used to store information about the raids in the level. It is stored as a gzip compressed NBT file.

Additional file raids_end.dat is stored in the data folder of end dimension folders, allowing for raids in other dimensions for villages in those dimensions.

Folder structure

Current

  • File directory.png: Sprite image for directory in Minecraft: A world directory.
    • File directory.png: Sprite image for directory in Minecraft dimensions
      • File directory.png: Sprite image for directory in Minecraft <namespace>: Namespace of a defined dimension.
        • File directory.png: Sprite image for directory in Minecraft <path>: Path of a defined dimension.
          • File directory.png: Sprite image for directory in Minecraft data: Miscellaneous data of the dimension.
            • File file.png: Sprite image for file in Minecraft raids.dat: Stores information about the ongoing raids in this dimension.

Deprecated ​[until: JE 26.1]

  • File directory.png: Sprite image for directory in Minecraft: A world directory.
    • File directory.png: Sprite image for directory in Minecraft data
      • File file.png: Sprite image for file in Minecraft raids.dat: Stores information about the ongoing raids in The Overworld.
    • File directory.png: Sprite image for directory in Minecraft DIM-1
      • File file.png: Sprite image for file in Minecraft raids.dat: Stores information about the ongoing raids in The Nether.
    • File directory.png: Sprite image for directory in Minecraft DIM1
      • File file.png: Sprite image for file in Minecraft raids_end.dat: Stores information about the ongoing raids in The End.

NBT structure

  • [NBT Compound / JSON Object]: The root tag.
    • [NBT List / JSON Array] raids: List of compound tags including raid information.
      • [NBT Compound / JSON Object]: A raid.
        • [Int] id: The ID of the raid.
        • [Byte] started: 1 or 0 (true/false). True if the raid has ever spawned a wave.
        • [Byte] active: 1 or 0 (true/false). Whether the raid functionality is active.
        • [Long] ticks_active: The timespan, in ticks, the raid has been going on for.
        • [Int] raid_omen_level: The level of bad omen for the raid. Affects raider enchantments and the extra wave.
        • [Int] groups_spawned: The number of waves that have spawned in the raid.
        • [Int] cooldown_ticks: The timespan, in ticks, until the initial spawning of raiders.
        • [Int] post_raid_ticks: The timespan, in ticks, after all the waves are cleared.
        • [Float] total_health: The sum of maximum health of all the raiders in the current wave.
        • [Int] group_count: The total number of waves in this raid.
        • [String] status: The status of the raid.
        • [Int Array] center: The position of the center of the raid, where raiders try to move to.
        • [NBT List / JSON Array] heroes_of_the_village: A list of players who have killed raiders in the raid. Each of these players receives the hero of the village effect when the raid ends in a victory status.
    • [Int] next_id: The ID for the next raid to occur.
    • [Int] tick: Internal clock.

History

Java Edition
1.1418w47aAdded raid data for all dimensions.
19w13aAdded HeroesOfTheVillage list.
1.161.16-pre3The data file for the nether, raids_nether.dat was renamed to raids.dat.
1.21.525w05aRenamed all data file fields to lowercase underscore format.
26.1snapshot 1Changed world directory structure

Sources