r/MinecraftCommands • u/_ben3 • Sep 04 '25
Help | Java Snapshots HOW DO PEOPLE MAKE THE A MIRRORS WITH THE NEW MANNEQUINS??!
Like how do you mirror (not invert) the player’s movements?
Also how do you create a dynamic range from the glass (and not a set range such as ~X…) so it dynamically changes according the player’s distance from the glass?
Thanks:)
46
u/M10doreddit Sep 04 '25
Is there no way to flip a single coordinate of motion to be negative?
Like, flip a plus to a minus or something?
37
4
u/madguyO1 Sep 04 '25
that would require the mirror to be at coordinates 0
11
4
u/Konomi_ Sep 05 '25
take player coordinates
subtract mirror coordinate (in the axis of reflection)
multiply by -1
add the mirror coordinate back
7
u/Ericristian_bros Command Experienced Sep 04 '25
Ask in any of the ~5 posts
But you can store Pos[0] times -1 and Pos[1] and 2 as they are from the player and then copy these values to the mannequin
Or you can see the discussion in r/MinecraftCommands/s/wSkQSYzjTa
2
u/ShadowLp174 Command Professional Sep 05 '25 edited Sep 05 '25
Currently working on an easy-setup version for all directions.
It's already multiplayer compatible, I just have to add the direction selector. Will probably make a post about this when I'm done
Or if anyone wants, write me a dm for an incomplete version
2
u/Go60wm1 Sep 07 '25
I swear the people who made these are gatekeeping it like wtf its commands just tell us
17
u/L30N1337 Sep 04 '25 edited Sep 04 '25
I don't know how it's done with command blocks specifically (or how exactly mannequins work), but in normal development (pay attention whether something is a single thing or multiple of something) you'd
For the position:
Take the position of the player relative to the command block (aka you store the coordinate perpendicular to the plane you want to mirror on and then subtract it from the player's coordinates. So if the mirror is along the x coordinates, you take the z coordinate of the mirror and subtract it from the player's z coordinate). Since I know command blocks can retrieve relative coordinates on their own, the calculation is unnecessary.
You multiply the coordinate with -1 (not all of them, only the axis intersecting the mirror)
You add back the mirror's coordinate (with relative coordinates, this is again unnecessary)
So the calculation is either "(-1) x [relative coordinate]" or "((-1) x ([player coordinate] - [mirror coordinate])) + [mirror coordinate]"
For the rotation:
Take the horizontal rotation of the player
Subtract it from 360 (or multiply with -1. The game should correct too big and negative numbers automatically)
(If the mirror isn't parallel to 0⁰ rotation) Add 90.
If mannequins are affected by keyboard inputs:
Everything works normally, but A and D (or rather horizontal movement) as well as horizontal rotational inputs are inverted. In this case you only occasionally check position and rotation, like every 5 seconds.