# Emote v2.1.0 Update
## Emote Management
### Minecraft Account-Based Skin Generation
- Added support for generating player skin textures using Minecraft accounts.
- You can link a Microsoft account with `/emote account login`. Follow the login URL and one-time code shown in chat. The code can be clicked to copy it.
- `/emote account` displays the current skin provider, registered accounts, and accounts that require reauthentication.
- Use `/emote account remove <name or UUID>` to remove a registered account.
- When multiple accounts are registered, upload jobs are distributed across them. Each account processes one job at a time, while different accounts can process jobs in parallel.
- When authentication expires, the mod attempts to refresh the token automatically. Rate limits and server errors are retried a limited number of times.
- If at least one account is registered, the account-based provider is used. Otherwise, MineSkin is used. If a registered account encounters an authentication issue, it is marked as requiring reauthentication.
- Account credentials are stored encrypted. On Windows, DPAPI is used by default. If `EMOTE_ACCOUNT_KEY` is set, AES-256-GCM is used instead. `EMOTE_ACCOUNT_KEY` must contain a Base64-encoded 32-byte key.
Because the registered account's actual Minecraft skin is changed during skin generation, using a dedicated account instead of your primary account is recommended.
### Player Skin Preparation and Cache
- Skin regions used by emotes are now prepared when a player joins.
- Required regions shared by multiple emotes are merged and deduplicated to reduce unnecessary requests.
- Cache access is now synchronized to improve stability when multiple skin generation jobs run concurrently.
- Improved overall skin processing stability.
### Emote Search
- Emote descriptions can now include searchable tags such as `#dance` and `#music`.
- The emote menu and wheel editor can search by name, ID, description, or `#tag`.
- Added a search field to the wheel editor for finding available emotes.
### Administrative Commands and Reloading
- Added `/emote info`. It displays active sessions and participants, display usage and limits, the current skin provider, active/queued/retrying jobs, and the number of loaded emotes.
- Display limit usage is shown in different colors depending on the current utilization.
- `/emote stop` can now target multiple players at once, and `/emote stop-all` has been removed.
- Improved the execution order of `/emote reload`. If loading the configuration, preparing the resource pack, or loading the emote directory fails, the existing configuration, emote list, and resource pack are preserved.
### Stress Testing and Processing Cost
- Stress test load can now be specified by instance count or display count using suffixes such as `100i` and `1000d`.
- Cleaned up processing-time and packet-load reporting in stress test results.
- Static nodes without transform tracks now reuse their local transformation matrices.
- Per-emote permission rules are precomputed to reduce the cost of permission checks on every playback request.
- Several more complex emotes have been added, so stress test results may need to be recalculated.
### Permissions and Automatic Idle Emotes
- The `emotes` and `idle.emote` fields in permission groups now support regular expressions. This allows emotes sharing a common prefix or naming pattern to be selected using a single rule.
- Strings that are valid Minecraft Identifiers are matched as literal strings. Other strings are interpreted as Java regular expressions.
- Regex-based idle emote selection uses equal probability and cannot be combined with explicit weights.
- If no currently loaded emote matches the regular expression, selection is deferred and checked again later.
### Cooldowns and Playback State
- Cooldowns are now calculated from the end of playback rather than from when playback begins.
- Added permission-group-specific cooldown modifiers. Time values such as `5s` are subtracted from the base cooldown, while values such as `x0.5` and `x2` apply a multiplier.
- When multiple permission groups apply, they are checked from top to bottom. The first entry that matches both the player and emote and defines `cooldown` is used.
- Fixed an issue where stopping an emote from a playback-start callback could leave playback partially started.
- If playback is stopped during startup processing, remaining start callbacks and timeline start events are no longer executed.
---
## Emote Playback and Expressions
### Movement and Loop Playback
- Setting `movement_distance`, the movement cancellation threshold, to `0` makes the animation scene follow the player's current position.
- Added `loop_start`, which specifies where repeated playback begins.
- The first playback begins at `0t`, while subsequent loops begin at the configured `loop_start`. This allows an intro section to play once while only the main section is repeated.
- A non-zero `loop_start` can only be used in `loop` mode and must be earlier than the end of the timeline.
### Extended Molang Expressions
- Extended the Molang runtime to support query functions that accept arguments and return string values.
- Conditional expressions now evaluate only the selected branch and support execution blocks enclosed in braces.
- Added `loop`, `break`, and `continue`. Each loop is limited to a maximum of 1,024 iterations.
- Expanded math function support with angle calculations, interpolation, random functions, dice functions, and various easing functions.
- Added `q.any`, `q.all`, `q.approx_eq`, and `q.in_range`.
- Added `q.position`, `q.position_delta`, and `q.movement_direction` for querying position and movement information.
- `q.is_item_equipped`, `q.item_is_charged`, and `q.is_item_name_any` can now target a specific slot.
- Added `q.scoreboard` for reading player scoreboard values.
- Added queries for states including blocking, eating, jump input, crawling, invisibility, levitation, Y-axis rotation speed, and remaining fire duration.
- Expression structures are now analyzed to detect unsupported queries and invalid assignments. Assignments to persistent variables inside tracks are validated in the same way.
- Dynamic NBT values can now be defined using Molang.
### Web Converter
- Multiple animation files can now be selected and imported at once.
- Added a `Loop start` field for editing the loop playback start position.
- Existing `loop_start` values can be imported from and exported to Emote JSON files.
- Reduced duplicate compilation of the same animation when checking animations and resource requirements.
- Generated resource bundles now include only the models and textures actually referenced by the exported animations.
### Conversion Accuracy and Output Data
- Continuous rotation conversion now selects angles that naturally continue from the previous frame. This improves rotations beyond 360 degrees and prevents reverse rotations from unexpectedly switching to unintended angles midway through the animation.
- Reduced sudden angle changes when crossing rotation-axis boundaries.
- Improved transform reconstruction so that the scale and rotation of the remaining axes are preserved even when one axis has a scale of zero.
- Fixed incorrect rotation of Animated Java displays.
- Fixed per-axis signs and parent-node application order in Animated Java Molang rotation output.
- Unnecessary keyframes, near-zero values, and static nodes are now removed during export, significantly reducing output file size.
### Emotecraft Support
- Added an Emotecraft converter.
- Emotecraft's `loop_from_tick` loop start position is preserved.
- NBS music embedded in Emotecraft files can be converted into Minecraft note block sound events.
- Music tempo, pitch, layer volume, note velocity, and fine pitch are taken into account.
- Solo layer settings are respected, and notes played on the same tick are grouped into a single event.
- Features that cannot be converted directly, such as custom instruments, notes outside the animation playback duration, stereo panning, and independent music looping, are reported as warnings.
- If embedded music cannot be read, the animation can still be converted without the music.
### Example Emotes
- Added backflip, cheer, laugh, and goat horn examples.
- Added a handstand sequence. The failure animation is selected with a 75% probability, while the success animation is selected with a 25% probability.
- Added a piano sequence. The normal performance is selected with a 95% probability, while `Ode to Joy` is selected with a 5% probability.
- Added seasonal Christmas and Halloween examples: `Jingle Bells` performed with handbells, and an emote that transforms the player into a bat and flies around.
- Added a four-piece drum set emote.
- Added a recorder performance of `Twinkle, Twinkle, Little Star`.
- Added a trumpet performance of the `Can-Can` from Offenbach's `Orpheus in the Underworld`.
- Added a victory trophy emote.
- Standardized emote naming and description formats. The sitting, handstand, and piano IDs now use the `idle.` prefix.
- Improved several existing emotes.
---
## Important Notes When Updating
- The `emotes.json` schema version has been updated to `3`. Existing version `2` configurations are migrated automatically.
- If an existing configuration references `emote:sit`, it must be changed to the new example ID, `emote:idle.sit`.
- The `select` and `options` formats in NBT tracks must be replaced with `molang` expressions.
- `item_source`, which referenced the item currently held by the player, has been removed. Item displays must now use `item_stack_snbt` to specify the item to render.
- A loop start tick has been added to the Java API's `PlaybackSettings`, and the types used for item nodes and dynamic NBT values have also changed. Integration code that directly constructs these types must be updated.
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }