Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Markup renderer #1

Open
phoenixr-codes opened this issue Oct 9, 2023 · 0 comments
Open

Markup renderer #1

phoenixr-codes opened this issue Oct 9, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@phoenixr-codes
Copy link
Contributor

Minecraft uses many different styling options for chat, signs, and other places such as §a for green text. Because you cannot easily interpret the style represented by the code a script could be added that supports a markup syntax in files which could look like this:

// using mcmarkup
{
  "format_version": 1,
  "message": "Hello <red>from <green>My World</green>!</red>"
}

This would tranlsate to:

{
  "format_version": 1,
  "message": "Hello §cfrom $aMy World§r§c!§r"
}

The configuration file could look something like this:

[scripts]
pre = [
  # ...
  {
    run = "mcmarkup",
    with = "ruby",
    args = [
      "-identifier", "// using mcmarkup",
      "-t",          "epic=5l",  # uses §5 (purple) and §l (bold)
      "-t",          "red=4",    # override built-in tags
    ]
  }
]
@phoenixr-codes phoenixr-codes added the enhancement New feature or request label Oct 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant