Overview
TheDummyTracker class is a Tracker implementation that is not attached to any entity. Dummy trackers are positioned at a fixed location in the world and can be moved manually. They are useful for static models, decorative elements, or models controlled entirely by scripts, plugins, or mods.
Package: kr.toxicity.model.api.tracker
Extends: Tracker
Since: 1.15.2
Key Features
- Fixed Position: Positioned at a specific location, independent of entities
- Manual Control: All movement and rotation must be controlled programmatically
- Lightweight: No entity synchronization overhead
- Static or Dynamic: Can be completely static or dynamically controlled
- Custom Rotation: Rotation based on location pitch/yaw
Constructor
location- The initial locationpipeline- The render pipelinemodifier- The tracker modifierpreUpdateConsumer- A consumer to run before the first update
This constructor is public but typically you should use
BetterModelAPI.createDummyTracker() or similar factory methods.Methods
Location Management
location
location (setter)
location- The new location (must not be null)
Player Management
spawn
player- The target player
Default Behavior
When aDummyTracker is created:
- Spawn Animation: Automatically plays the “spawn” animation with
PLAY_ONCEmodifier (if available) - Scale: Uses the configured
ModelScalerfrom the tracker - Rotation: Uses the location’s pitch and yaw for model rotation
Usage Examples
Creating a Dummy Tracker
Moving a Dummy Tracker
Animated Movement
Rotating Dummy Tracker
Static Decoration
Interactive Dummy
Spawning for Specific Players
Cleanup
Common Use Cases
1. Static Decorations
Use dummy trackers for decorative models that don’t move:- Statues
- Furniture
- Buildings
- Signs
2. Animated Props
Use for props with looping animations:- Windmills
- Waterfalls
- Flags
3. Cutscene Elements
Use for scripted cutscene models:- NPCs in cutscenes
- Moving platforms
- Cinematic objects
4. World Bosses (Non-Entity)
Use for custom boss models not tied to entities:Performance Considerations
- Location Updates: Minimize calls to
location(PlatformLocation)as they send packets to all viewers - Pausing: Use
pause(true)for completely static models to save CPU - View Distance: Use
TrackerModifier.sightTrace(false)if models don’t need line-of-sight checks - Animations: Static models should use
AnimationModifier.playOnce(true)for spawn animations
Events
The following events are fired for dummy trackers:CreateDummyTrackerEvent- When the tracker is created- All standard
Trackerevents (spawn, despawn, close, etc.)
See Also
- Tracker - Base tracker class
- EntityTracker - Tracker attached to entities
- TrackerModifier - Configuration options
- TrackerUpdateAction - Update actions
