Skip to content

Commit 6c4a7b0

Browse files
committed
🎯 Add Basic Locator Documentation
1 parent 9dab41e commit 6c4a7b0

File tree

1 file changed

+74
-2
lines changed
  • src/routes/docs/[...4]the-blueprint-format/[...6]locators

1 file changed

+74
-2
lines changed
Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,76 @@
11
---
22
title: Locators
3-
description: Everything you need to know about Locators in the Blueprint Format.
4-
---
3+
description: Locators are used to execute commands at a specific position / rotation relative to the Rig Instance.
4+
---
5+
6+
# { $frontmatter.title }
7+
8+
{ $frontmatter.description }
9+
10+
## Config Options
11+
12+
- ### Use Entity
13+
14+
If enabled, the locator will have an entity associated with it.
15+
16+
- ### Entity Type
17+
18+
The entity type of the locator's entity.
19+
20+
_Requires `Use Entity` to be enabled._
21+
22+
- ### Summon Commands
23+
24+
The commands that will be executed when the locator is summoned.
25+
26+
_Requires `Use Entity` to be enabled._
27+
28+
- ### Ticking Commands
29+
30+
Custom commands that will be executed every tick.
31+
32+
If `Use Entity` is enabled, the commands will be executed as the locator's entity.
33+
34+
## Excuting Commands as / at Locators
35+
36+
:::admonition type=info title=Example
37+
Execute at a specific locator's position
38+
39+
```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>
41+
```
42+
43+
```txt title="foo/position.mcfunction"
44+
$execute positioned $(posx) $(posy) $(posz) rotated $(roty) $(rotx) run ...
45+
```
46+
47+
:::
48+
49+
:::admonition type=info title=Example
50+
Execute as a specific locator's entity
51+
52+
Note that this method will only work if you have the Locator's `Use Entity` config option enabled.
53+
54+
```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>
56+
```
57+
58+
```txt title="foo/select.mcfunction"
59+
$execute as $(uuid) run ...
60+
```
61+
62+
:::
63+
64+
:::admonition type=info title=Example
65+
66+
Executing commands at all of a Rig Instance's locators that have an entity associated with them.
67+
68+
```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'}
70+
```
71+
72+
```txt title="foo/as_locator.mcfunction"
73+
say Hello, World!
74+
```
75+
76+
:::

0 commit comments

Comments
 (0)