-
Notifications
You must be signed in to change notification settings - Fork 32
Env Options
There are several environment settings provided by DHP for mcfunction
files,
which are put under the datapack.env.*
config section.
- List of Options
- History
The command syntax version for this project.
-
"1.17"
: For the latest Minecraft: Java Edition 1.17 snapshot. -
"1.16"
: (Default) For Minecraft: Java Edition 1.16.4. -
"1.15"
: For Minecraft: Java Edition 1.15.2.
The download source of the completion data.
-
"GitHub"
: (Default) Download those data fromraw.githubusercontent.com
. -
"码云"
: Download those data fromgitee.com
. You can choose this ifraw.githubusercontent.com
is blocked in your country/region.
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.
-
"Latest snapshot"
: Case-insensitive. Use the latest snapshot. -
"Latest release"
: (Default) Case-insensitive. Use the latest release. - Any other version identities in the version manifest
that were released after Minecraft: Java Edition
19w40a
.
Specify the default visibility for resources. See also Access Modifiers.
-
"public"
: (Default) Public. -
"internal"
: Internal. -
"private"
: Private. - (Object) Simulates a
@within
modifier.-
type
: The type of files that can access this resource. Can be one of the file types or"*"
. -
pattern
: A namespaced ID pattern. See Access Modifiers for more information.
-
- (Array) Simulates a series of
@within
modifiers.- (Object) Using the same format as the above object.
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.
-
true
: (Default) Enable. -
false
: Disable.
The language server detects recursively to see if there is a pack.mcmeta
file and a data
folder so that it can
tell if a folder is a data pack. By changing the value of this config, you can alter the data pack detection depth
of the language server. Note that higher values require more time to check and might reduce the performance.
By setting a value greater than or equal to 1
, you can open the .minecraft/saves/<save name>/datapacks
folder
directly in your editor and enjoy editing all data packs within it instead of having all data packs added to the
workspace manually.
- Any integer. Defaults to
1
.
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.
{
"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.
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
.
{
"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
.
The version of the JSON schemas. Only major versions are available.
-
"1.17"
: For the latest Minecraft: Java Edition 1.17 snapshot. -
"1.16"
: (Default) For Minecraft: Java Edition 1.16.4.
The language in which the texts provided by the language server should be.
-
"Default"
: (Default) Use the same language as VS Code uses. - code: Use the specific language.
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
.
-
2
: (Default) Use permission level2
. -
1
: Use permission level1
. -
3
: Use permission level3
. -
4
: Use permission level4
.
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 . |
3.0.0 | Added defaultVisibility , detectionDepth , and jsonVersion . |