Skip to main content
The BoneName record represents a parsed bone name with associated tags. It’s used throughout BetterModel to identify and filter bones based on their naming conventions.

Class Information

Package: kr.toxicity.model.api.bone
Type: Record
Since: 1.0.0

Record Components

Components

  • tags - The set of tags extracted from the raw name (e.g., #hitbox, #head)
  • name - The clean name without tags
  • rawName - The original unparsed name string

Creation

Parsing from String

Parses a raw bone name string into a BoneName instance. Tags are extracted based on the configured tag registry. Example:

JSON Deserialization

A JSON deserializer for automatic parsing in configuration files. Example JSON:

Tag Management

Checking for Tags

Checks if this bone name contains any of the specified tags. Example:

Getting Item Mapper from Tags

Converts bone tags to an appropriate item mapper. Returns BoneItemMapper.EMPTY if no tags specify a mapper. Example:

Common Tag Patterns

BetterModel uses tags to define special behaviors for bones:

Display Tags

  • #left_hand - Display as left-hand item
  • #right_hand - Display as right-hand item
  • #head - Display as head/helmet item

Functional Tags

  • #hitbox - Should create a hitbox
  • #interactive - Interactive element
  • #mount - Mountable bone

Example Usage

Equality and Hashing

Bone names are compared based on their rawName field:
Example:

String Representation

Returns the raw name string. Example:

Naming Conventions

When naming bones in your 3D modeling software:
  1. Use descriptive names: head, left_arm, weapon
  2. Add tags with # prefix: #hitbox.body, #left_hand.item
  3. Use dot notation for hierarchy: armor.helmet, weapon.blade
  4. Combine multiple tags: #hitbox#interactive.door
Example bone hierarchy:

See Also