๐ last_final#
Last steps before saving: the source lore font, the pack icon, the overlay formats and the macro line checks.
- DIALOG_TEMPLATE: Pattern[str] = re.compile('\\btemplate"?\\s*:\\s*("(?:[^"\\\\]|\\\\.)*"|\'(?:[^\'\\\\]|\\\\.)*\')')[source]#
A dialog
dynamic/run_commandtemplate, whose$(key)placeholders the client fills in, not the function.
- declare_overlay_formats(
- entries: list[JsonDict],
- last_pre_minor_format: int,
Give every overlay the old
formatskey when one reacheslast_pre_minor_format, and remove it from all otherwise.The game refuses the whole pack.mcmeta when overlays disagree on it. Entries without
min_formatkeep their ownformats.>>> entries = [{"directory": "a", "formats": [93, 100], "min_format": [93, 0], "max_format": [100, 1]}] >>> declare_overlay_formats(entries, last_pre_minor_format=64) >>> entries [{'directory': 'a', 'min_format': [93, 0], 'max_format': [100, 1]}] >>> entries.append({"directory": "b", "min_format": 0, "max_format": 72}) >>> declare_overlay_formats(entries, last_pre_minor_format=64) >>> [entry["formats"] for entry in entries] [[93, 100], [0, 72]]