Skip to content

Instantly share code, notes, and snippets.

@intsuc
Created January 3, 2024 20:16
Show Gist options
  • Save intsuc/c05223b1503865539f85c54adeffe9c4 to your computer and use it in GitHub Desktop.
Save intsuc/c05223b1503865539f85c54adeffe9c4 to your computer and use it in GitHub Desktop.
Approximate rigid motion by 2 approximate reflections
summon text_display ~ ~ ~ {text: '{"text": "a", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 10]}
summon text_display ~ ~ ~ {text: '{"text": "b", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 11]}
summon text_display ~ ~ ~ {text: '{"text": "c", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 12]}
summon text_display ~ ~ ~ {text: '{"text": "(b⋅a)b", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 0]}
summon text_display ~ ~ ~ {text: '{"text": "bab", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 1]}
summon text_display ~ ~ ~ {text: '{"text": "(c⋅bab)c", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 2]}
summon text_display ~ ~ ~ {text: '{"text": "c(bab)c", "color": "red"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 3]}
teleport 0-0-0-0-0 ~ ~ ~ ~ ~
return 1
teleport 0-0-0-0-1 ~ ~ ~ ~ ~
return 1
teleport 0-0-0-0-2 ~ ~ ~ ~ ~
return 1
teleport 0-0-0-0-3 ~ ~ ~ ~ ~
return 1
execute \
as 0-0-0-0-a \
at 0-0-0-0-b \
positioned ^ ^ ^2048.0 \
facing entity @s feet \
positioned ^ ^ ^2048.0 \
if function teleport_b_dot_a_b \
rotated as 0-0-0-0-b \
positioned ^1024.0 ^ ^ \
facing entity @s feet \
positioned ^ ^ ^-1024.0 \
rotated as 0-0-0-0-b \
positioned ^-2048.0 ^ ^ \
if function teleport_bab \
\
as 0-0-0-0-1 \
at 0-0-0-0-c \
positioned ^ ^ ^2048.0 \
facing entity @s feet \
positioned ^ ^ ^2048.0 \
if function teleport_c_dot_bab_c \
rotated as 0-0-0-0-c \
positioned ^1024.0 ^ ^ \
facing entity @s feet \
positioned ^ ^ ^-1024.0 \
rotated as 0-0-0-0-c \
positioned ^-2048.0 ^ ^ \
if function teleport_cbabc \
\
run particle dust 1 0 0 1 ~ ~ ~ 0 0 0 0 1 force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment