How can I connect 2 coordinates in Minecraft, for example with effects or something?

ra
17

I want to build a large structure and I have to build a triangular shape. How can I build a straight line to the corner points?

Li

I could do it, but it's a bit cumbersome and it's definitely easier.

This solution works for Java for sure, unfortunately I'm not familiar with Bedrock.

First you need a commandblock and two armorstands. You place these armorstands in the two corners that you want to connect. Now you give one Armorstand day 1 and the other day 2 (for example).

Now you place the command block and set it to repeat. Then you finish pressing and the block should turn purple.

Then you type in the chat:

/ execute as @e [tag = 1, type = armor_stand] at @s run teleport @s ~ ~ ~ facing entity @e [tag = 2, type = armor_stand, limit = 1]

Press enter and Armorstand 1 should turn into a 2.

Now to the command block:

execute as @e [tag = 1, type = armor_stand] at @s run teleport @s ^ 0.2

Press enter, nothing should happen.

Now place another command block on it so that the arrow of the one just labeled points into the other command block. You now open the other command block and set it to Chain (chaining) and to always active (i.e. Not required Redstone) here you write in:

execute as @e [tag = 1, type = armor_stand] at @s run setblock ~ ~ ~ dirt

Press enter and put a lever on the purple command block and operated it, turn it off as soon as Armorstand 1 has reached the other.

Phew, that was longer than I thought, but as far as I know it works safely under Java.

ra

I have to disappoint you it didn't work out that way maybe I made the mistake with the tags but that was what I mean by name tag, right? I named 2 nametags after 1 and 2 and clicked on the armor stands and then executed your commands.

Li

Oh sorry, you got that wrong!

You have to look at the Armorstand and write in the chat:

/ tag add (long number) 1 (or 2)

(I don't know at the moment whether you have the long number first and then the add, or vice versa, but that's what you get suggested.)

The long number is the Armorstand ID.

Sorry, I forgot to explain.

Li

Remember to deactivate the purple command block on time, if that doesn't work, enter the following in the chat:

/ kill @e [tag = 1]

:-)

PS: your line is shown in the example with earth blocks.

ra

One more question what do you mean by long number?

Li

You play under Java right?

Or do you play on the phone or the console (Bedrock)

ra

Java

Li

How gest von Bedrock I have no idea, but if you look at the armor stand, so that you could destroy it with a click of the left mouse button, then in the chat (t) ung enter:

/Day

Then there should be a few suggested things, for example @s or @p or your player name, there should also be a VERY long number if you did everything correctly and you click on it so that it is in the chat.

If that doesn't work for any reason, you can write:

/ tag add @e [type = armor_stand, limit = 1, sort = nearest]

With this you do not determine the armor stand exactly, but you describe it. Make sure there's no other armorstand nearby. To be on the safe side, just stand as close as possible to the armor stand.

ra

Ah OK thanks

Li

Well

Li

Is it working or are you still having problems?

ra

Well what can I say it still doesn't work that you can look at each other for me but thanks again for your help

Li

Did you write that?

Li

Enter exactly that:

/ execute as @e [tag = 1, type = minecraft: armor_stand] at @s run teleport @s ~ ~ ~ facing entity @e [tag = 2, limit = 1]

(copy paste)

ra

Ok it just worked once but I entered / execute facing entity 1 eyes facing entity 2 eyes

I'm pretty sure that's rubbish and that's why I have another guess as to why it doesn't work I have over 836 blocks away, I guess that's just too big

Li

Oh that could be good…

ra

Hello again I repeated it in the smaller room and it didn't work anyway