Overview
Bones are the individual components that make up your model. Each bone is rendered as a separate item display entity and can be manipulated independently. Hitboxes enable player interaction with specific bones.Understanding Bones
Bone Hierarchy
Bones are organized in a parent-child tree structure:Bone Names and Tags
Bones are identified byBoneName, which includes tags for special functionality:
src/main/java/com/example/BoneExample.java
BoneTag
Marks head bones used for height calculation
BoneTag
Head bone that includes child bones in height calculation
BoneTag
Left arm bones
BoneTag
Right arm bones
Bone Manipulation
Changing Displayed Items
src/main/java/com/example/BoneItems.java
Applying Tint/Color
Bone Transformations
src/main/java/com/example/BoneTransform.java
Applying Display Properties
Adding Enchantment Glint
Bone Predicates
Filter bones usingBonePredicate:
Hitboxes
Hitboxes enable player interaction with model parts using invisible entities.Creating Hitboxes
src/main/java/com/example/HitboxExample.java
HitBox Listeners
Listen to various hitbox events:src/main/java/com/example/HitboxListeners.java
Hitbox Events
Listen to specific event types:src/main/java/com/example/HitboxEvents.java
Getting Hitboxes
Hitbox Properties
Hitbox Mounting
Allow entities to ride hitboxes:src/main/java/com/example/MountableHitbox.java
Hitbox Visibility
Removing Hitboxes
Advanced: Listener Hooks
Register global hitbox listeners on tracker:src/main/java/com/example/GlobalHitboxListener.java
Bone Positions
Get world positions of bones:Nametags
Add nametags to bones:src/main/java/com/example/Nametag.java
Best Practices
Use predicates for bulk operations
Use predicates for bulk operations
Apply changes to multiple bones efficiently:
Cache bone references
Cache bone references
Don’t look up bones repeatedly:
Use forceUpdate after modifications
Use forceUpdate after modifications
Ensure changes are visible:
Clean up hitboxes properly
Clean up hitboxes properly
Remove hitboxes when no longer needed:
Complete Example
src/main/java/com/example/InteractiveNPC.java
See Also
Trackers
Managing tracker lifecycle
Animations
Per-bone animation control
Custom Events
Responding to hitbox events
API Reference
Complete RenderedBone API
