Skip to main content
The BonePredicate interface extends Predicate<RenderedBone> to provide advanced filtering capabilities with child bone propagation control. It’s the primary way to select specific bones for operations.

Class Information

Package: kr.toxicity.model.api.util.function
Type: Interface
Extends: Predicate<RenderedBone>
Since: 1.0.0

Core Methods

Factory Methods

By Name

Creates a predicate that matches bones by name (case-insensitive). Example:

By Tag

Creates a predicate that matches bones containing any of the specified tags. Example:

From Custom Predicate

Wraps a standard predicate as a BonePredicate. Example:

Constants

Example:

Child State Control

The State enum controls whether predicates apply to child bones:

State Behavior Examples

Builder Interface

The BonePredicate.Builder provides fluent methods to configure child state:

Building Predicates

Example:

Common Usage Patterns

Filtering Bone Streams

Conditional Operations

Hierarchical Matching

Animation Control

Hitbox Creation

Advanced Combinations

Performance Tips

  1. Reuse predicates - Create once, use multiple times
  2. Use withoutChildren() when possible - Reduces unnecessary checks
  3. Combine filters efficiently - Put most restrictive conditions first
  4. Cache results - Store filtered bone lists if used repeatedly
Example:

See Also