1. Rigs
  2. Interacting with Locators

Rigs

Interacting with Locators

Locators are points in space that can be used to execute commands at specific positions / rotations relative to your Rig Instance. This page explains how to interact with Locators in your Rig Instance using commands.

Single Locator Functions

  • As Locator - animated_java:<export_namespace>/as_locator

    Runs a command as and at a specific locator's entity.

    Arguments

    Name Type Description
    name String The name of the locator to run the command as.
    command String The command to run as the locator.
    Example
    Running a command as a locator
            execute as @e[tag=aj.<export_namespace>.root] run \
      function animated_java:<export_namespace>/as_locator \
        {name: '<locator_name>', command:'say Hello, World!'}
    
          
    Note

    The as_locator function will only work if you have the Locator's Use Entity config option enabled.

  • At Locator - animated_java:<export_namespace>/at_locator

    Runs a command at a specific locator's position / rotation.

    Arguments

    Name Type Description
    name String The name of the locator to run the command at.
    command String The command to run at the locator's position.
    Example
    Running a command at a locator
            execute as @e[tag=aj.<export_namespace>.root] run \
      function animated_java:<export_namespace>/at_locator \
        {name: '<locator_name>', command:'particle minecraft:angry_villager ~ ~ ~'}
    
          
    Note

    The at_locator function does not require the Locator's Use Entity config option to be enabled.

Multi Locator Functions

  • As All Locators - animated_java:<export_namespace>/as_all_locators

    Runs a command as and at all locators in the Rig Instance.

    Arguments

    Name Type Description
    command String The command to run as all locators.
    Example
    Running a command as all locators
            execute as @e[tag=aj.<export_namespace>.root] run \
      function animated_java:<export_namespace>/as_all_locators \
        {command:'say Hello, World!'}
    
          
    Note

    The as_all_locators function will only work if all Locators have the Use Entity config option enabled.

  • At All Locators - animated_java:<export_namespace>/at_all_locators

    Runs a command at all locators in the Rig Instance.

    Example

    Arguments

    Name Type Description
    command String The command to run at all locators.
    Running a command at all locators
            execute as @e[tag=aj.<export_namespace>.root] run \
      function animated_java:<export_namespace>/at_all_locators \
        {command:'particle minecraft:angry_villager ~ ~ ~'}
    
          
    Note

    The at_all_locators function does not require the Locators' Use Entity config option to be enabled.