Overview
TheTrackerModifier record class defines configuration options for a Tracker. It controls various behaviors such as visibility checks (sight trace), automatic damage animations, and damage tinting effects.
Package: kr.toxicity.model.api.tracker
Since: 1.15.2
Record Components
sightTrace
true
JSON Name: sight-trace
damageAnimation
true
JSON Name: damage-animation
This only applies to
EntityTracker. DummyTracker does not use this setting.damageTint
true
JSON Name: damage-tint
This only applies to
EntityTracker. DummyTracker does not use this setting.Constants
DEFAULT
Methods
builder
toBuilder
Builder
TheTrackerModifier.Builder class provides a fluent API for constructing TrackerModifier instances.
sightTrace
sightTrace-trueto enable sight tracing
damageAnimation
damageAnimation-trueto enable damage animations
damageTint
damageTint-trueto enable damage tinting
build
TrackerModifier.
Returns: The created modifier
Usage Examples
Using Default Settings
Custom Configuration
Modifying Existing Configuration
Configuration Profiles
JSON Serialization
Configuration Files
Feature Details
Sight Trace
WhensightTrace is enabled:
- The model checks line of sight from each player’s eye location to the model location
- Players without line of sight will not see the model
- Useful for realistic visibility (models behind walls are hidden)
- Has a small performance cost for the raytrace calculation
- The model is visible to all players within render distance
- Better performance for models that should always be visible
- Recommended for bosses, decorations, and important entities
Damage Animation
WhendamageAnimation is enabled:
- The tracker automatically plays the “damage” animation when the entity takes damage
- Falls back to “hurt” animation if “damage” is not available
- Animation priority can be configured in the animation file
- No automatic damage animation
- You can still manually trigger animations with
tracker.animate("damage") - Useful when you want custom damage animation logic
Damage Tint
WhendamageTint is enabled:
- The model is tinted red when the entity takes damage
- Tint color can be customized with
EntityTracker.damageTintValue(int) - Tint duration is 10 tracker ticks (250ms) by default
- Uses
TrackerUpdateAction.tint()internally
- No automatic damage tint
- You can still manually apply tints with
tracker.update(TrackerUpdateAction.tint(color)) - Useful for custom damage indication logic or when tinting conflicts with other effects
Best Practices
- Use Profiles: Create reusable modifier profiles for different entity types
- Performance: Disable
sightTracefor models that should always be visible - Consistency: Use the same modifier settings for similar entity types
- Documentation: Document why you disabled certain features in comments
- Testing: Test with different settings to find the best balance for your use case
See Also
- Tracker - Base tracker class that uses this modifier
- EntityTracker - Entity tracker that uses damage features
- DummyTracker - Dummy tracker (doesn’t use damage features)
