• Converts raw Minecraft Wiki data into an NBT schema.

    To find the data to input into this, go on the Minecraft Wiki and look for NBT/Level Format documentation, then find the data structure you want to convert and click "Edit Source", then copy the text in between <div class="treeview"> and </div>, all the lines should begin with an asterisk.

    Type Parameters

    • F extends boolean | "auto" = "auto"

    Parameters

    Returns F extends true
        ? NBTSchemaFragment
        : F extends false ? NBTSchema : NBTSchema | NBTSchemaFragment

    const data = `*{{nbt|compound}}: The root tag.
    **{{nbt|long|mapId}}: The Unique ID of the map.
    **{{nbt|long|parentMapId}}: The Unique ID's of the parent maps.
    **{{nbt|byte|dimension}}: 0 = The [[Overworld]], 1 = [[The Nether]], 2 = [[The End]], any other value = a static image with no player pin.
    **{{nbt|byte|fullyExplored}}: 1 if the map is full explored.
    **{{nbt|byte|mapLocked}}: 1 if the map has been locked in a [[cartography table]].
    **{{nbt|byte|scale}}: How zoomed in the map is, and must be a number between 0 and 4 (inclusive) that represent the level. Default 0. If this is changed in an [[anvil]] or a [[cartography table]], the Unique ID of the map changes.
    **{{nbt|byte|unlimitedTracking}}: Unknown. Default 0.
    **{{nbt|short|height}}: The height of the map. Is associated with the scale level.
    **{{nbt|short|width}} The width of the map. Is associated with the scale level.
    **{{nbt|int|xCenter}}: Center of the map according to real world by X.
    **{{nbt|int|zCenter}}: Center of the map according to real world by Z.
    **{{nbt|list|decorations}}: A list of optional icons to display on the map.
    ***{{nbt|compound}}: An individual decoration.
    ****{{nbt|compound|data}}
    *****{{nbt|int|rot}}: The rotation of the symbol, ranging from 0 to 15. South = 0, West = 4, North = 8, East = 12.
    *****{{nbt|int|type}}: The ID of the [[Map icons.png|map icon]] to display.
    *****{{nbt|int|x}}: The horizontal column (x) where the decoration is located on the map (per pixel).
    *****{{nbt|int|y}}: The vertical column (y) where the decoration is located on the map (per pixel).
    ****{{nbt|compound|key}}
    *****{{nbt|int|blockX}}: The world x-position of the decoration.
    *****{{nbt|int|blockY}}: The world y-position of the decoration.
    *****{{nbt|int|blockZ}}: The world z-position of the decoration.
    *****{{nbt|int|type}}: Unknown.
    **{{nbt|byte-array|colors}}: An array of bytes that represent color values ('''65536 entries''' for a default 128×128 map).`;

    writeFileSync(path.join(import.meta.dirname, "./nbtSchema.json"), JSON.stringify(NBTSchemas.Utils.Conversion.FromMinecraftWikiData.wikiNBTToNBTSchema(data), null, 4));