Repository navigation
Custom Modes
Creray edited this page Nov 10, 2026
·
9 revisions
Targeted extends vanilla Resource Packs with support for custom animated crosshairs.
A resource pack can define custom crosshair modes and rules using the following directory structure:
name/
βββ assets/
β βββ <namespace>
β βββ crosshair/
β β βββ mode/ # JSON files defining crosshair modes
β β βββ rule/ # JSON files defining rules
β βββ textures/gui/sprites/crosshair/ # Textures that can be referenced in `mode.animations.sprites`
β βββ <...> # Other resource pack files
βββ <...> # Other Resource pack files Modes are defined as JSON files located in <pack_name>/assets/<namespace>/crosshair/mode/.
The filename (without the .json extension) serves as the mode identifier.
For example, my_cool_mode.json defines the mode namespace:my_cool_mode.
<The root tag>
βββ tracks # Track[]: List of track definitions (JSON objects)
β βββ id # String: Unique identifier of this track. Visible only within the current mode
β βββ duration # Int: Track duration in ticks
β βββ controller # Controller: Defines how the track's progress is controlled
βββ animations # Animation[]: List of animation definitions (JSON objects)
βββ track_id # String: ID of the track controlling this animation
βββ limited_by? # String: ID of another track that limits this animation's progress
βββ sprites # Identifier[]: List of sprites used by this animation, selected according to the controlling track's progressA rule defines the conditions under which a particular crosshair mode should be activated.
Rules are defined as JSON files located in <pack_name>/assets//crosshair/rule/. The filename (without the .json extension) serves as the rule's identifier.
<The root tag>
βββ priority # Int: Priority of this rule. Higher values take precedence over lower ones
βββ trigger # Trigger: Defines when this rule is evaluated
βββ conditions # Condition[]: List of conditions that must all be satisfied for the rule to match
βββ mode # Identifier: ID of the crosshair mode to activate when this rule matchesNote
This page is a work in progress.