-
Notifications
You must be signed in to change notification settings - Fork 0
Config
The config of the Minecraft mod can be found in your Minecraft folder under config/command_crafter.properties. Additionally, the clientside config can be edited through ModMenu.
The following options are available in the config:
-
services-port(number): This defines the network port on which the CommandCrafter services are available. This must match with the address defined in the extension settings. The default is52853. -
run-dedicated-server-services(boolean): This option is only available on dedicated servers. When set totrue, the CommandCrafter services will be directly available through the running server, so the extension can connect directly to it instead of connecting to the Minecraft client. Note that the server does not perform authentification like it does with Minecraft clients. Thus, when this feature is enabled, it is important to control who has access to the port. It is recommended to use a connection to the Minecraft client instead of the server whenever possible. The default isfalse.
The settings of the VSCode Extension can be found by searching for "CommandCrafter" in the VSCode settings.
The following options are available in the settings:
-
Command Crafter: Minecraft Address(string): The network address on which the extension can open the CommandCrafter services. The default islocalhost:52853. -
Command Crafter: Feature Config(object): A map of feature names to"enable"or"disable". This lets you enable or disable certain features of CommandCrafter. For example, if you want to disable semantic tokens because you have another extension that already does syntax highlighting, you can set theanalyzer.semanticTokensto"disable". The default enables all language features but disables automatic reloading. [More info on possible keys] -
CommandCrafter: Check Extension Compatiblity(boolean): Whether the extension sould scan for possible conflicts with other extensions (like for syntax highlighting) and prompt the user to fix the conflicts. The default istrue.
The analyzer providing highlighting, errors, etc. has a few optional features that can be disabled: Its optional features are: completions, hovers, definitions, diagnostics and semanticTokens, which are all enabled by default. To specify one of those features in the feature config across all files, you can use keys like analyzer.completions, analyzer.hovers etc.
If you want to specify one of those features in only specific types of files, you can add the name of the analyzer after analyzer. Two types of analyzers currently exist: mcfunction and json. For example, if you want to specify a feature only for json/mcmeta files, you can use keys like analyzer.json.completions.
Additionally, the JSON analyzer also lets you specify the type of json files after json. Possible options are: packmeta, scoreboardStorage, or any folder inside the data/assets directory such as advancement, atlases, banner_pattern,item_modifier,tags/block, worldgen/biome etc. For example, if you want to specify a feature only for predicates, you can use keys like analyzer.json.predicate.diagnostics.
If two entries affect the same file, the more specific entry will be used. For example, one entry could disable all diagnostics and another could enable it only for item modifiers. In that case, diagnostics will be provided in item modifiers but not in other files.
CommandCrafter makes it possible to automatically reload your packs upon saving a file. This can be enabled by setting the following feature keys in the Command Crafter: Feature Config VSCode setting:
-
autoreload.resourcepack- Reloads resources when saving any file that is part of a resourcepack. (When saving a shader, only shaders will be reloaded) -
autoreload.datapack_json- Reloads datapacks when saving a .json file in a datapack if that file is reloadable. if the file is not reloadable, a log message will be displayed informing you that the world has to be restarted to load changes. CommandCrafter can recognize if Worldgen Devtools is installed, which makes a lot more files reloadable if thereload_registriesgamerule is turned on (note that turning it on carries the risk of world corruption). -
autoreload.datapack_functions- Reloads datapacks when saving a function file in a datapack. This could cause problems when saving an unfinished command that has unintended consequences.