Search results
29 maj 2017 · You can do this in 1.13+ now, with the /execute store command. The steps are as follows: store player coordinates > calculate the differences > square the differences > sum up > calculate the sqrt values. I'm using euclidean distance as the metric. 1.
distance=..50 or distance=0..50..50 means in a radius of 50 block. One good thing for 1.13, so you wouldn't have do distance=50, distance_min=0.
You can use the positioned component to specify the executing position and then use distance to specify the distance from that position, in your case [distance=0..1].
Hello, I'm making a minecraft java map, and I need to have command blocks around the map that measure the distance between the nearest player. Anyone know how to do this?
21 cze 2014 · On a single player world you could use a tool similar to Optifine which allows you to set your view distance beyond the normal limits of 16 chunks to a "extreme" view distance of 32 chunks or 512x512 blocks.
Take the length of a line running perpendicular to a block edge or face (e.g., the green line when looking at the top of a block). If one normal sized block is the same height as the green line, the player is standing about 60 blocks away from it. 1.5 blocks means 95 blocks away, 2 blocks long means 130 blocks away etc.
You can use execute store result ... run data get entity @s ..., to get the players's position in each axis, found in the Pos[x,y,z] data tag. If you store the target's coordinates and your coordinates in different scores, you can use subtraction using scoreboard players operation to find the distance along each axis.