mojira.dev
MC-24143

Minecraft Multiplayer command block arguments not fully working

In command blocks, arguments such as coordinates and radius seem not to work!
Ex:

tp @a[x=0,y=100,z=0,r=0] ~0 ~0 ~5

Normally this would only teleport players in the radius of 0 at 0,100,0 5 blocks away, but instead teleports everyone in the server 5 blocks away

This only happends when r=0 or their is no r=.

Attachments

Comments 11

Cannot confirm. See me pressing the button while nothing happens.

What plugins has the server running ?

No plugins, completely vanilla. It really sucks because my server uses a lot of command blocks and now they seem to be broken. I will post a video up on youtube in a little bit.

Kumasasa I found the specific problem, either remove the r= or have it r=0. Normally if r=0 or if their is no r, then the x,y,and z coords are specific to one block. This is still a problem because if the command block is for a specific block and it has an @a, everyone would be teleport in the server rather then who ever is on that specific block. I won't be posting a video unless you truley want me to.

Can still not reproduce. (Did try with r=0 and without r)

Can you please attach screenshots with F3 enabled with the contents of your command block ?

1 more comments

You have to specify a search radius.

This isn't a suggestion, but common sense.

You SHOULD be able to have a specific point for a player to be teleported from. It's a bug that without the radius, it chooses everyone in the server that applies.

Isn't this just a duplicate of MC-12239?

@unknown: Short solution: r=1. Not perfect, because that's a cross-shape (one block away from the specified block), but it should solve your specific problem.

There's a reason for the current behavior: generating lists of players, ordered by their proximity to the specified coordinate. For example: @a[x=10,y=40,z=10,c=5] will produce the closest 5 players to that point, regardless of distance. If the default distance (no r argument) was only the specified block, this command wouldn't work. What should you specify for an r value if you want infinite search distance?

I'm not sure there's any difference between @p and @a once you specify a value for c. @p just implies c=1, while @a implies c=0 or infinite.

Ideally, there would be a way to specify any distance, from a single block, to infinite distance. Currently, omitting the r argument, or setting r=0, means infinite, and there's no way to specify a single block distance, since r=1 means every block within one block of the specified coordinates. Possible solutions are to use r=-1 for infinite, and r=0 for a single block, or shift it all down, leaving r=0 for infinite, and have r=1 mean a single block, r=2 mean a cross-section (like r=1 means now), etc.

Another solution would be to allow fractional coordinates/radius in the command (MC-9074), so you could specify r=0.5, which, since it offsets the coordinates by 0.5 to make it centered on blocks, rather than intersections (MC-13526), r=0.5 would specify a single block, and achieve the desired behavior).

Anthony Jemmer

(Unassigned)

Unconfirmed

argument, command_block, multiplayer

Minecraft 1.6.2

Retrieved