Skip to content

Commit 4df6f2d

Browse files
committed
🚧 Fix annoying formatting issues with Prettier
1 parent 48436d5 commit 4df6f2d

File tree

3 files changed

+56
-101
lines changed
  • src/routes/docs
    • [...3]exported-rigs
      • [...2]summoning-a-new-rig-instance
      • [...3]controlling-a-rig-instance
    • [...4]the-blueprint-format/[...6]locators

3 files changed

+56
-101
lines changed

‎src/routes/docs/[...3]exported-rigs/[...2]summoning-a-new-rig-instance/+page.md

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,14 @@ description: Learn how to summon a new Rig Instance.
77

88
To summon a new Rig Instance, you will need to use the `summon` function provided by the Rig's export namespace. This function will create a new Rig Instance at your current position, and rotation in the world:
99

10-
```html title=Summoning a Rig Instance | copy
11-
function animated_java:<export_namespace>/summon {args: {}}</export_namespace>
10+
```rust title=Summoning a Rig Instance | copy
11+
function animated_java:<export_namespace>/summon {args: {}}
1212
```
1313

1414
However, you may want to specify the position and rotation of the Rig Instance. To do this, you can change the execution context of the `summon` function:
1515

16-
```html title=Summoning a Rig Instance at a specific position and rotation | copy
17-
execute positioned
18-
<x>
19-
<y>
20-
<z>
21-
rotated
22-
<rx>
23-
<ry>
24-
run function animated_java:<export_namespace>/summon {args: {}}</export_namespace></ry
25-
></rx
26-
></z
27-
></y
28-
></x
29-
>
16+
```rust title=Summoning a Rig Instance at a specific position and rotation | copy
17+
execute positioned <x> <y> <z> rotated <rx> <ry> run function animated_java:<export_namespace>/summon {args: {}}
3018
```
3119

3220
## Arguments
@@ -40,30 +28,26 @@ The `summon` function can take the following arguments:
4028

4129
:::admonition type="info" title="Examples"
4230

43-
```html title="Summon a Rig Instance with the no_head Variant"
44-
function animated_java:<export_namespace>/summon {args: {variant: 'no_head'}}</export_namespace>
31+
```rust title="Summon a Rig Instance with the no_head Variant"
32+
function animated_java:<export_namespace>/summon {args: {variant: 'no_head'}}
4533
```
4634

4735
Summon a Rig Instance posed as the first frame of the `walk` Animation:
4836

49-
```html
50-
function animated_java:<export_namespace>/summon {args: {animation: 'walk'}}</export_namespace>
37+
```rust
38+
function animated_java:<export_namespace>/summon {args: {animation: 'walk'}}
5139
```
5240

5341
Summon a Rig Instance posed as the third frame of the `walk` Animation:
5442

55-
```html
56-
function animated_java:<export_namespace
57-
>/summon {args: {animation: 'walk', frame: 3}}</export_namespace
58-
>
43+
```rust
44+
function animated_java:<export_namespace>/summon {args: {animation: 'walk', frame: 3}}
5945
```
6046

6147
Summon a Rig Instance posed as the first frame of the `walk` Animation and start the Animation:
6248

63-
```html
64-
function animated_java:<export_namespace
65-
>/summon {args: {animation: 'walk', start_animation: true}}</export_namespace
66-
>
49+
```rust
50+
function animated_java:<export_namespace>/summon {args: {animation: 'walk', start_animation: true}}
6751
```
6852

6953
:::

‎src/routes/docs/[...3]exported-rigs/[...3]controlling-a-rig-instance/+page.md

Lines changed: 36 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,26 @@ description: Learn how to control a Rig Instance.
99

1010
Before we can control a Rig Instance, we need to be able to select it. The following selectors can be used to select Rig Instances:
1111

12-
```html title=Select all Rig Instances | copy
12+
```rust title=Select all Rig Instances | copy
1313
@e[type=item_display,tag=aj.rig_root]
1414
```
1515

16-
```html title=Select all Rig Instances from a specific Blueprint | copy
17-
@e[type=item_display, tag=aj.<export_namespace>.root]</export_namespace>
16+
```rust title=Select all Rig Instances from a specific Blueprint | copy
17+
@e[type=item_display, tag=aj.<export_namespace>.root]
1818
```
1919

2020
## Moving and Rotating the Rig Instance
2121

2222
Similar to how we control normal entities in Minecraft, we can move and rotate Rig Instances using the `tp` command.
2323

24-
```html title=Move a Rig Instance 5 blocks towards positive X | copy
25-
execute as @e[type=item_display,tag=aj.<export_namespace
26-
>.root] at @s run \ tp @s ~5 ~ ~</export_namespace
27-
>
24+
```rust title=Move a Rig Instance 5 blocks towards positive X | copy
25+
execute as @e[type=item_display,tag=aj.<export_namespace>.root] at @s run \
26+
tp @s ~5 ~ ~
2827
```
2928

30-
```html title=Rotate a Rig Instance 90 degrees | copy
31-
execute as @e[type=item_display,tag=aj.<export_namespace
32-
>.root] at @s run \ tp @s ~ ~ ~ ~90 ~</export_namespace
33-
>
29+
```rust title=Rotate a Rig Instance 90 degrees | copy
30+
execute as @e[type=item_display,tag=aj.<export_namespace>.root] at @s run \
31+
tp @s ~ ~ ~ ~90 ~
3432
```
3533

3634
## Controlling Animation Playback
@@ -41,48 +39,36 @@ Animation playback is controlled using functions. Each animation has a set of fu
4139

4240
Starts playing the animation from the beginning.
4341

44-
```html title=Play the walk animation | copy
45-
execute as @e[type=item_display,tag=aj.<export_namespace
46-
>.root] run \ function animated_java:<export_namespace
47-
>/animations/walk/play</export_namespace
48-
></export_namespace
49-
>
42+
```rust title=Play the walk animation | copy
43+
execute as @e[type=item_display,tag=aj.<export_namespace>.root] run \
44+
function animated_java:<export_namespace>/animations/walk/play
5045
```
5146

5247
### Pause Function
5348

5449
Pauses the animation at the current frame.
5550

56-
```html title=Pause the walk animation | copy
57-
execute as @e[type=item_display,tag=aj.<export_namespace
58-
>.root] run \ function animated_java:<export_namespace
59-
>/animations/walk/pause</export_namespace
60-
></export_namespace
61-
>
51+
```rust title=Pause the walk animation | copy
52+
execute as @e[type=item_display,tag=aj.<export_namespace>.root] run \
53+
function animated_java:<export_namespace>/animations/walk/pause
6254
```
6355

6456
### Resume Function
6557

6658
Resumes the animation from the current frame.
6759

68-
```html title=Resume the walk animation | copy
69-
execute as @e[type=item_display,tag=aj.<export_namespace
70-
>.root] run \ function animated_java:<export_namespace
71-
>/animations/walk/resume</export_namespace
72-
></export_namespace
73-
>
60+
```rust title=Resume the walk animation | copy
61+
execute as @e[type=item_display,tag=aj.<export_namespace>.root] run \
62+
function animated_java:<export_namespace>/animations/walk/resume
7463
```
7564

7665
### Stop Function
7766

7867
Stops the animation and resets it to the beginning.
7968

80-
```html title=Stop the walk animation | copy
81-
execute as @e[type=item_display,tag=aj.<export_namespace
82-
>.root] run \ function animated_java:<export_namespace
83-
>/animations/walk/stop</export_namespace
84-
></export_namespace
85-
>
69+
```rust title=Stop the walk animation | copy
70+
execute as @e[type=item_display,tag=aj.<export_namespace>.root] run \
71+
function animated_java:<export_namespace>/animations/walk/stop
8672
```
8773

8874
### Apply Frame Function
@@ -93,12 +79,9 @@ Sets the animation to a specific frame with interpolation.
9379

9480
- `frame` (int): The frame to set the animation to.
9581

96-
```html title=Set the walk animation to frame 10 with interpolation | copy
97-
execute as @e[type=item_display,tag=aj.<export_namespace
98-
>.root] run \ function animated_java:<export_namespace
99-
>/animations/walk/apply_frame {frame: 10}</export_namespace
100-
></export_namespace
101-
>
82+
```rust title=Set the walk animation to frame 10 with interpolation | copy
83+
execute as @e[type=item_display,tag=aj.<export_namespace>.root] run \
84+
function animated_java:<export_namespace>/animations/walk/apply_frame {frame: 10}
10285
```
10386

10487
### Set Frame Function
@@ -109,12 +92,9 @@ Sets the animation to a specific frame instantly without interpolation.
10992

11093
- `frame` (int): The frame to set the animation to.
11194

112-
```html title=Set the walk animation to frame 10 | copy
113-
execute as @e[type=item_display,tag=aj.<export_namespace
114-
>.root] run \ function animated_java:<export_namespace
115-
>/animations/walk/set_frame {frame: 10}</export_namespace
116-
></export_namespace
117-
>
95+
```rust title=Set the walk animation to frame 10 | copy
96+
execute as @e[type=item_display,tag=aj.<export_namespace>.root] run \
97+
function animated_java:<export_namespace>/animations/walk/set_frame {frame: 10}
11898
```
11999

120100
#### Tween Function
@@ -126,34 +106,25 @@ Pauses all currently playing animations, and smoothly transitions to the target
126106
- `to_frame` (int): The frame of this animation to tween to.
127107
- `duration` (int): The duration of the tween in ticks.
128108

129-
```html title=Smoothly transition the walk animation to frame 10 over a second | copy
130-
execute as @e[type=item_display,tag=aj.<export_namespace
131-
>.root] run \ function animated_java:<export_namespace
132-
>/animations/walk/tween {to_frame: 10, duration: 20}</export_namespace
133-
></export_namespace
134-
>
109+
```rust title=Smoothly transition the walk animation to frame 10 over a second | copy
110+
execute as @e[type=item_display,tag=aj.<export_namespace>.root] run \
111+
function animated_java:<export_namespace>/animations/walk/tween {to_frame: 10, duration: 20}
135112
```
136113

137114
## Applying Variants
138115

139116
Variants can be applied to the Rig Instance using the desired Variant's `apply` function.
140117

141-
```html title=Apply the angry Variant | copy
142-
execute as @e[type=item_display,tag=aj.<export_namespace
143-
>.root] run \ function animated_java:<export_namespace
144-
>/variants/angry/apply</export_namespace
145-
></export_namespace
146-
>
118+
```rust title=Apply the angry Variant | copy
119+
execute as @e[type=item_display,tag=aj.<export_namespace>.root] run \
120+
function animated_java:<export_namespace>/variants/angry/apply
147121
```
148122

149123
There is no way to remove a Variant individually once it has been applied. To reset the Variant to it's default state, you can apply the default Variant.
150124

151-
```html title=Apply the default Variant | copy
152-
execute as @e[type=item_display,tag=aj.<export_namespace
153-
>.root] run \ function animated_java:<export_namespace
154-
>/variants/default/apply</export_namespace
155-
></export_namespace
156-
>
125+
```rust title=Apply the default Variant | copy
126+
execute as @e[type=item_display,tag=aj.<export_namespace>.root] run \
127+
function animated_java:<export_namespace>/variants/default/apply
157128
```
158129

159130
:::admonition type=warning

‎src/routes/docs/[...4]the-blueprint-format/[...6]locators/+page.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ When selecting a Locator in `Animate Mode`, you can add Command Keyframes to it'
7777

7878
:::admonition type=info title=Example
7979

80-
```txt title="A Simple Execute Condition"
80+
```rust title="A Simple Execute Condition"
8181
if entity @s[tag=my_tag]
8282
```
8383

84-
```txt title="A More Complex Execute Condition"
84+
```rust title="A More Complex Execute Condition"
8585
aligned xyz positioned ~.5 ~ ~.5 if entity @n[tag=my_tag,distance=..0.1]
8686
```
8787

@@ -94,12 +94,12 @@ Sometimes you may want to execute commands at a specific locator's position / ro
9494
:::admonition type=info title=Example
9595
Execute at a specific locator's position
9696

97-
```txt title="foo/as_root.mcfunction"
97+
```rust title="foo/as_root.mcfunction"
9898
execute as <root> on passengers if entity @s[tag=aj.data] run \
9999
function foo:position with entity @s data.locators.<locator_name>
100100
```
101101

102-
```txt title="foo/position.mcfunction"
102+
```rust title="foo/position.mcfunction"
103103
$execute positioned $(posx) $(posy) $(posz) rotated $(roty) $(rotx) run ...
104104
```
105105

@@ -110,12 +110,12 @@ Execute as a specific locator's entity
110110

111111
Note that this method will only work if you have the Locator's `Use Entity` config option enabled.
112112

113-
```txt title="foo/as_root.mcfunction"
113+
```rust title="foo/as_root.mcfunction"
114114
execute as <root> on passengers if entity @s[tag=aj.data] run \
115115
function foo:select with entity @s data.locators.<locator_name>
116116
```
117117

118-
```txt title="foo/select.mcfunction"
118+
```rust title="foo/select.mcfunction"
119119
$execute as $(uuid) run ...
120120
```
121121

@@ -125,13 +125,13 @@ $execute as $(uuid) run ...
125125

126126
Executing commands at all of a Rig Instance's locators that have an entity associated with them.
127127

128-
```txt title="foo/as_root.mcfunction"
128+
```rust title="foo/as_root.mcfunction"
129129
execute as <root> run \
130130
function animated_java:<export_namespace>/as_own_locator_entities \
131131
{command:'function foo:as_locator'}
132132
```
133133
134-
```txt title="foo/as_locator.mcfunction"
134+
```rust title="foo/as_locator.mcfunction"
135135
say Hello, World!
136136
```
137137

0 commit comments

Comments
 (0)