r/MinecraftCommands • • Sep 04 '25

Help | Java Snapshots HOW DO PEOPLE MAKE THE A MIRRORS WITH THE NEW MANNEQUINS??!

Post image

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:)

138 Upvotes

13 comments sorted by

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:

  1. 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.
  2. You multiply the coordinate with -1 (not all of them, only the axis intersecting the mirror)
  3. 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:

  1. Take the horizontal rotation of the player
  2. Subtract it from 360 (or multiply with -1. The game should correct too big and negative numbers automatically)
  3. (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.

5

u/_ben3 Sep 04 '25

WOAH man thank you so much! I’m gonna try using stuff you said! Thanks!

3

u/L30N1337 Sep 04 '25

It should work, at least to mirror the player's current state. If the last point is possible, it should work completely (including stuff like punching).

I came up with this on a bus ride, so no testing anywhere on my part, so no guarantee it works. But it should.

1

u/Theoneoddish380 Sep 04 '25

similar but unrelated topic.

i did a simular thing with the camera command.

ive recently started to use the camera command and i came up with an item requirement system.

if the item (for sake of reference i'll say stick as thats what i used for testing) is in the first slot of the hotbar it'll change all players with a stick in that slot, to a custom 3rd person. to disable it you have to hold the stick in your main hand anywhere other than slot 1 of the hotbar. you can also use it as a selfie stick because of this brief player side requirement.

i thought of a multitude of ways to do this but it works when ran like this.

anywho thats my lil sidequest story thing

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

u/Ericristian_bros Command Experienced Sep 04 '25

Yes, multiply times -1

4

u/madguyO1 Sep 04 '25

that would require the mirror to be at coordinates 0

11

u/Theoneoddish380 Sep 04 '25

add a relative position selector like an up arrow or tillde

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