Included content
| Name | |
|---|---|
User Changes:
This update introduces new JSON commands to interact with persistent data.
commander:store_nbt_data which allows you to store a simple string or number value,
and commander:store_expression_data just like store_nbt_data, but with expressions.
{
"type": "commander:store_nbt_data", //command type
"target": "level", //the target we want to attach data to.
"selector": "origin", //Selector for position and entity targets.
"key": "cmd_my_cool_data", //The data key for later reference.
"element": "Hello World!" //Our string or number value. This is a nbt element, so true and false are not supported.
}
store_expression_data is identical, but element is renamed to expression and only accepts expressions.
The target can be one of the following:
level current level. Any selector.chunk selected chunk. Position selector.entity selected entity. Entity selector.block_entity selected block entity. Position selector.Later on this data can be used in expressions like so:
level.storage.my_cool_data * 0.7 or this_entity.storage.even_cooler_data == 'freak''.
Along with the JSON command this update introduces a the cmd:data brigadier command. This command allows you to read and write data just like the JSON command.
The syntax goes like this:
cmd:data -> operation (read/write) -> target -> selector (@s/~ ~ ~) -> key (-> data (for write))
Other Changes:
~/.commander.Dev Changes:
is(Type)Value to expression result.| Name | |
|---|---|
| File | Type | Size | |
|---|---|---|---|
| commander-0.5.0-1.20.1-build.13-sources.jar | Unknown | 83.31 KiB |
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:86bUtxWv:hiiJqtOJ"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:86bUtxWv:hiiJqtOJ"
}