Fixed:
- Resolved a critical state management issue where applying transformations to a bone (e.g., `scale`, `item`, `offset`) would reset any previously applied transformations. The bone's state is now persistent across separate commands, allowing for cumulative adjustments.
Added:
- **New `offset` Mechanism:** Added an `offset` mechanism to `BMBoneTag`. This allows scripters to apply a local positional offset to a bone using a `LocationTag` without altering its currently displayed item or scale. Syntax: `adjust <bone> offset:<location>`.
- **New `view_range` Mechanism:** Added a `view_range` mechanism to `BMBoneTag`. This allows scripters to set the render distance of a bone's display entity in blocks, using a decimal value. This is useful for hiding model parts in certain camera perspectives. Syntax: `adjust <bone> view_range:<#.#>`.
Changed:
- The `item` mechanism for `BMBoneTag` has been refactored. It no longer accepts a `LocationTag` for an offset. Its sole purpose is now to set the `ItemTag` for the bone, preserving any existing offset or scale.
Extracted core bone manipulation logic from BMBoneTag into the new net.openproject.dbettermodel.api.BMBone API class. This significantly reduces complexity in the Denizen object layer, improves code structure, and enhances reusability.
Simplified BMBoneTag to act as a lightweight proxy, delegating all mechanism logic (tint, visible, item) to the new BMBone API.
Added:
New API Class: Introduced net.openproject.dbettermodel.api.BMBone, a high-level API for programmatic control over individual model bones. It provides simplified methods for tinting, visibility (global and per-player), item setting, and scaling.
New Mechanism: Added a scale mechanism to BMBoneTag. This allows scripters to adjust the non-uniform scale of a bone's displayed item using a LocationTag as a vector.
New Command Argument: Added an optional hide:<player> argument to the bmlimb command. This allows hiding all of the target player's active models from a specific observer player.
Changed:
Updated the syntax of the bmlimb command to include the new optional hide argument.
Modified BMLimbCommand's processing logic to interact with the target player's EntityTrackerRegistry to apply per-player visibility changes when the hide argument is used.