English / 日本語 / 简体中文Data-pack Helper Plus can provide many heavy language features for documents in your datapack, including advancements, dimensions, dimension types, functions, loot tables, predicates, recipes, all kinds of tags, and worldgen settings. If you like this extension, please consider sponsoring me. You can also report bugs, suggest features, and help translations! See CONTRIBUTING.md for more information.
DisclaimerWe tried our best to keep your datapacks safe. However, your documents might still be corrupted under certain extreme circumstances by DHP, and we couldn't provide any help if the said thing happened. Please back up your precious work from time to time like uploading it to a cloud storage, which is really important even if you choose not to use DHP! InstallationYou can install DHP from the VSCode Marketplace: Alternatively, press Ctrl + P and execute Note: DHP has a minimum version requirement of VSCode FeaturesWorkspace SupportPlease use the root folder of your datapack (where the Moreover, DHP fully supports VSCode's multi-root workspace feature. Every root which contains a You can access any content of any root as long as they are in the same workspace. The order of the roots in your workspace will affect the priority of these datapacks in DHP. The root at the beginning will be loaded at first, and the root at the end will be loaded at last, which means that the earlier the root is, the lower priority in DHP it has. This is exactly how Minecraft loads datapacks and decide which one overrides another one if a file has the same namespaced ID and is in the same category. For example, if your multi-root workspace looks like this:
And then you use If you try to execute these commands in Minecraft, you can also noticed that the function in Datapack B is executed.
By acting like this, DHP ensures that the order it handling datapacks is consistent with Minecraft. Note: you can drag and put the root folders in VSCode to sort them, and DHP will update the priority of them in DHP accordingly, which is really handy. Multiple Language SupportDHP supports multiple languages. Currently these languages are available:
If you'd like to help us translate this project into other languages, it would be really appreciated! See CONTRIBUTING.md for more information! Semantic Highlighting
All command arguments can be colored semantically. We also encourage you to install Arcensoth's language-mcfunction extension to get instant coloring feedback. Signature InformationYou can get hints about the arguments of commands while typing. Signature information will automatically show if you commit a space character. Alternatively you can use Ctrl + Shift + Space (or other configured hotkey) to show signature information manually. CompletionsThe extension can compute completions as you typing commands. Completions will automatically show if
you commit one of these characters: Alternatively you can use Ctrl + Space (or other configured hotkey) to show completions manually. DHP can provide completions for simple commands:
For more complex NBT tags, with help from mc-nbtdoc made by Yurihaia:
And also NBT paths:
And also text components:
And also NESTING THEM TOGETHER:
Code SnippetsDHP provides some helpful code snippets. See VSCode's official docs to learn more about code snippets. Both DHP and VSCode allow you to custom your code snippets, and they use exactly the same syntax because DHP is based on VSCode. For mcfunction files, code snippets added by DHP will be shown in the completions list only when the cursor is at the beginning of a command, however snippets added by VSCode's Declaration Comments
You can use Alias Comments
You can use Diagnostics and Code Actions
DHP provides real-time diagnostics about your commands. It can show syntax errors as Minecraft does, and even give your more detailed warnings. Some diagnostics also have a corresponding quickfix action so that you can fix them easily. Formatting and Linting
You can format the current function by pressing Shift + Alt + F or other configured hotkey. Also there are several linting rules you can set in the configuration settings. DHP can report errors for commands that don't follow your preference. Folding RangesYou can use comments (
Alternatively, you can use different amount of hash symbols followed by at least one white space to create different levels of folding ranges:
Call HierarchyThis feature is finished by using the proposed API, which is only accessible in development environment. Call hierarchies are a great way to navigate through functions. You can get all the callers/callees of a function, function tag, or an advancement reward by using this feature. The default hotkey of this feature is Color InformationDHP will display colors for Hover InformationThis is WIP. DHP shows user-defined documentation when you hover on specific arguments, e.g. on function namespaced IDs, tags, teams, etc. Resolving Namespaced IDsYou can navigate to advancements, loot tables, functions, predicates, and all kinds of tags by Ctrl-clicking on their namespaced IDs. Goto DefinitionsYou can goto the definitions of objectives, entities, tags, teams, bossbars, and data storages in the workspace by Ctrl-clicking on their names. Finding ReferencesYou can find all the references of objectives, entities, tags, teams, bossbars, data storages, advancements, functions, loot tables, predicates, recipes, and all kinds of datapack tags in the workspace by pressing Shift + F12 or other configured key. RenamingYou can rename entities, tags, teams, bossbars, data storages, advancements, functions, loot tables, predicates, recipes, and all kinds of datapack tags by pressing F2 or other configured key on their names. All the references of the same symbol in the whole workspace will be renamed. Additionally, if you rename a namespaced ID with file definition (e.g. the ID for advancement, function, loot table, predicate, recipe or tag), the corresponding file in the workspace will be renamed/moved too. However, renaming a file in a workspace manually will not update the namespaced IDs of it, and may cause problems with the cache. Configuration SettingsPress Ctrl + Regenerating CacheDHP uses cache to accelerate the process of renaming, finding references/definitions, document links, etc. However, the cache may become outdated because of various reasons, which could lead to strange behaviors. You can use the |