mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
docs: document /achievement command and improve bot API section
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/040066ee-3143-4142-9daa-ad89f96e2675 Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
This commit is contained in:
parent
e93c05caaa
commit
02f008d73c
2 changed files with 18 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ title: Creating Chat Bots
|
|||
- [Quick Introduction](#quick-introduction)
|
||||
- [Examples](#examples)
|
||||
- [AI-Assisted Bot Authoring](#ai-assisted-bot-authoring)
|
||||
- [Achievements And Advancements](#achievements-and-advancements)
|
||||
- [C# API](#c#-api)
|
||||
|
||||
## Notes
|
||||
|
|
@ -233,18 +234,29 @@ Create a standalone MCC /script bot that follows private messages, uses GetVerba
|
|||
|
||||
Chat bots and C# scripts can read the current achievement state and react to updates.
|
||||
|
||||
Useful methods:
|
||||
Methods:
|
||||
|
||||
- `GetAchievements()`
|
||||
- `GetUnlockedAchievements()`
|
||||
- `GetLockedAchievements()`
|
||||
- `OnAchievementUpdate(IReadOnlyList<Achievement> updated, IReadOnlyList<string> removedIds, bool reset)`
|
||||
|
||||
Things worth knowing:
|
||||
The `Achievement` record exposes:
|
||||
|
||||
- `Id` (`string`) - resource identifier, e.g. `minecraft:story/root` or `achievement.openInventory`
|
||||
- `Title` (`string?`) - display name, or `null` for legacy achievements
|
||||
- `Description` (`string?`) - display description, or `null` for legacy achievements
|
||||
- `Type` (`AchievementType`) - `Task`, `Challenge`, `Goal`, or `Legacy`
|
||||
- `IsCompleted` (`bool`) - whether all requirements have been met
|
||||
- `IsHidden` (`bool`) - whether the advancement is hidden in the UI until unlocked
|
||||
- `Requirements` (`IReadOnlyList<IReadOnlyList<string>>`) - OR-groups of criteria that must all be satisfied
|
||||
- `CriteriaProgress` (`IReadOnlyDictionary<string, bool>`) - per-criterion completion status
|
||||
|
||||
Notes:
|
||||
|
||||
- On `1.8` to `1.11.2`, ids use the legacy `achievement.*` format.
|
||||
- On `1.12+`, ids use advancement resource ids such as `minecraft:story/root`.
|
||||
- Legacy achievements usually have `Title = null` and `Description = null` because the server does not send display metadata in the statistics packet.
|
||||
- Legacy achievements have `Title = null` and `Description = null` because the server does not send display metadata in the statistics packet.
|
||||
- On newer versions, revoking an advancement may remove it from the current set instead of turning it into a locked entry, so `removedIds` matters.
|
||||
|
||||
Example:
|
||||
|
|
|
|||
|
|
@ -224,12 +224,14 @@ In scripts and remote control, no slash is needed to perform the command, eg. `q
|
|||
|
||||
- **Description:**
|
||||
|
||||
Show the achievements or advancements currently known to MCC.
|
||||
List achievements and advancements MCC has received from the server.
|
||||
|
||||
On Minecraft `1.8` to `1.11.2`, MCC tracks legacy achievements such as `achievement.openInventory`.
|
||||
|
||||
On Minecraft `1.12+`, MCC tracks advancements such as `minecraft:story/root`.
|
||||
|
||||
Each entry shows completion status, title (when the server sends one), id, and type. For example: `[DONE] Stone Age (minecraft:story/mine_stone) [Task]`.
|
||||
|
||||
- **Usage:**
|
||||
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue