You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/routes/docs/[...4]the-blueprint-format/[...6]locators/+page.md
+66-4Lines changed: 66 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,14 @@ description: Locators are used to execute commands at a specific position / rota
7
7
8
8
{ $frontmatter.description }
9
9
10
+
## Creating a Locator
11
+
12
+
To create a locator, locate the `Add Locator` button above the outliner.
13
+
14
+

15
+
16
+
If this button isn't there, you can press `h` and then search for `Add Locator`.
17
+
10
18
## Config Options
11
19
12
20
-### Use Entity
@@ -31,13 +39,64 @@ description: Locators are used to execute commands at a specific position / rota
31
39
32
40
If `Use Entity` is enabled, the commands will be executed as the locator's entity.
33
41
34
-
## Excuting Commands as / at Locators
42
+
## Animating Locators
43
+
44
+
### Position / Rotation
45
+
46
+
Locators must be a child of a Bone in order to be positioned / rotated.
47
+
48
+
### Command Keyframes
49
+
50
+
When selecting a Locator in `Animate Mode`, you can add Command Keyframes to it's Timeline to play commands at specific times during an animation.
51
+
52
+

53
+
54
+
#### Command Keyframe Options
55
+
56
+
-#### Command
57
+
58
+
The command(s) that will be executed. Supports multiple commands (one per line) similar to a `mcfunction`, and supports [MC-Build](https://mcbuild.dev/) syntax.
59
+
60
+
-#### Repeat?
61
+
62
+
If enabled, the command will be executed every `Repeat Frequency` ticks until the next keyframe.
63
+
64
+
-#### Repeat Frequency
65
+
66
+
The amount of ticks between each repeated command execution. A value of `1` will execute the command every tick.
67
+
68
+
`Repeat Frequency` is relative to the animation, and will pause / play with the animation.
69
+
70
+
If your animation's length is not evenly divisible by the `Repeat Frequency`, the time between the last command execution and the end of the animation will be less than the `Repeat Frequency`.
71
+
72
+
-#### Execute Condition
73
+
74
+
A condition that must be met in order for the command to be executed.
75
+
76
+
Expects a chain of [execute sub-commands](https://minecraft.wiki/w/Commands/execute#Syntax) without `execute` or `run`.
77
+
78
+
:::admonition type=info title=Example
79
+
80
+
```txt title="A Simple Execute Condition"
81
+
if entity @s[tag=my_tag]
82
+
```
83
+
84
+
```txt title="A More Complex Execute Condition"
85
+
aligned xyz positioned ~.5 ~ ~.5 if entity @n[tag=my_tag,distance=..0.1]
86
+
```
87
+
88
+
:::
89
+
90
+
## Excuting Commands as / at Locators Externally.
91
+
92
+
Sometimes you may want to execute commands at a specific locator's position / rotation from an external function. This can be done by getting the locator's information using the data entity's `data.locators.<locator_name>` NBT.
35
93
36
94
:::admonition type=info title=Example
37
95
Execute at a specific locator's position
38
96
39
97
```txt title="foo/as_root.mcfunction"
40
-
execute as <root> on passengers if entity @s[tag=aj.data] run function foo:position with entity @s data.locators.<locator_name>
98
+
execute as <root> on passengers if entity @s[tag=aj.data] run \
99
+
function foo:position with entity @s data.locators.<locator_name>
41
100
```
42
101
43
102
```txt title="foo/position.mcfunction"
@@ -52,7 +111,8 @@ Execute as a specific locator's entity
52
111
Note that this method will only work if you have the Locator's `Use Entity` config option enabled.
53
112
54
113
```txt title="foo/as_root.mcfunction"
55
-
execute as <root> on passengers if entity @s[tag=aj.data] run function foo:select with entity @s data.locators.<locator_name>
114
+
execute as <root> on passengers if entity @s[tag=aj.data] run \
115
+
function foo:select with entity @s data.locators.<locator_name>
56
116
```
57
117
58
118
```txt title="foo/select.mcfunction"
@@ -66,7 +126,9 @@ $execute as $(uuid) run ...
66
126
Executing commands at all of a Rig Instance's locators that have an entity associated with them.
67
127
68
128
```txt title="foo/as_root.mcfunction"
69
-
execute as <root> run function animated_java:<export_namespace>/as_own_locator_entities {command:'function foo:as_locator'}
129
+
execute as <root> run \
130
+
function animated_java:<export_namespace>/as_own_locator_entities \
0 commit comments