Skip to content

Commit

Permalink
CHANGELOG.md + Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
melontini committed Jul 11, 2024
1 parent f7eeca6 commit a9748a7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 35 deletions.
54 changes: 20 additions & 34 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,30 @@

User Changes:

This update introduces new JSON commands to interact with persistent data.
* Added `cmd:expression` to `/execute if`.
* Updated EvalEx to v3.3.0. [Release Notes...](https://github.com/ezylang/EvalEx/releases/tag/3.3.0)
* Removed `commander:store_expression_data` and `commander:store_nbt_data` JSON commands, as they can be easily replaced by the brigadier command and don't offer any advantages.

`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.
Example replacement:

```json5
```json
{
"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.
"type": "commander:store_expression_data",
"target": "level",
"selector": "origin",
"key": "my_cool_data",
"expression": "random(0, 2)"
}
```
`store_expression_data` is identical, but `element` is renamed to `expression` and only accepts expressions.

The target can be one of the following:
Becomes:

- `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:

* Moved mappings cache to `~/.commander`.
* Mapping are now saved as compressed TSRG2.

Dev Changes:

* Added `is(Type)Value` to expression result.
```json
{
"type": "commander:commands",
"selector": "origin",
"commands": [
"cmd:data write level my_cool_data ${{random(0, 2)}}"
]
}
```
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ org.gradle.caching=true
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
# Mod Properties
mod_version=0.5.0
mod_version=0.6.0
maven_group=me.melontini
archives_base_name=commander

0 comments on commit a9748a7

Please sign in to comment.