Skip to content

Env Options

SPGoding edited this page Jun 24, 2020 · 7 revisions

There are several environment settings provided by DHP for mcfunction files, which are put under the datapack.env.* config section.

List of Options

cmdVersion

The command syntax version for this project.

Available options

dataSource

The download source of the completion data.

Available options

  • "GitHub": (Default) Download those data from raw.githubusercontent.com.
  • "码云": Download those data from gitee.com. You can choose this if raw.githubusercontent.com is blocked in your country/region.

dataVersion

The completion data version for this project. This option affects completions for namespaced IDs (like entity IDs, block IDs, etc), NBT tags, and NBT paths.

Available options

dependsOnVanilla

Whether this datapack depends on the vanilla datapack or not. If this option is enabled, completions for the corresponding data of the vanilla datapack will be provided.

Available options

  • true: (Default) Enable.
  • false: Disable.

exclude

Files that should be excluded from validation. Each string in this array will be interpreted as a glob pattern to test the relative file paths from the root of the datapack.

Example

{
    "datapack.env.exclude": [
        "data/spgoding/functions/generated/**/*.mcfunction"
    ]
}

This will make the language server not validate any mcfunction files under the data/spgoding/functions/generated/ directory.

include

Files that should be included from validation. Each string in this array will be interpreted as a glob pattern to test the relative file paths from the root of the datapack.

This option takes priority over exclude.

Example

{
    "datapack.env.exclude": [
        "data/spgoding/functions/generated/**/*.mcfunction"
    ],
    "datapack.env.include": [
        "data/spgoding/functions/generated/special.mcfunction"
    ]
}

This will make the language server not validate any mcfunction files under the data/spgoding/functions/generated/ directory, except data/spgoding/functions/generated/special.mcfunction.

language

The language in which the texts provided by the language server should be.

Available Options

  • "Default": (Default) Use the same language as VS Code uses.
  • code: Use the specific language.

permissionLevel

The permission level for mcfunction files in this projects. Should be lower than or equal to the function-permission-level defined in your server.properties.

Available Options

  • 2: (Default) Use permission level 2.
  • 1: Use permission level 1.
  • 3: Use permission level 3.
  • 4: Use permission level 4.

History

Version Description
1.1.0 Added version and permissionLevel.
1.13.5 Added dataVersion.
2.0.0 Added dataSource, dependsOnVanilla, exclude, and include. Renamed version to cmdVersion.
2.1.0 Added language.
Clone this wiki locally