1
Well, I have been searching for 2 days, but still no result.
Is there any command that I can teleport players when they stand on a block ( location )
like this
/tp @p[minecraft:light_gray_wool at x=0,y=12,z=0] -69 10 69
Please Help
VERSION:JAVA 1.18.2
Is there any command that I can teleport players when they stand on a block ( location )
like this
/tp @p[minecraft:light_gray_wool at x=0,y=12,z=0] -69 10 69
Please Help
VERSION:JAVA 1.18.2
Create an account or sign in to comment.
14
1
Pressure plate
1
Ok you can do something like this: execute positioned x y z if entity @p[distance=..0.4] run tp @p -69 10 69
Replace x y z with the location where you want to be checking for the player. (Btw make it always active repeat)
Replace x y z with the location where you want to be checking for the player. (Btw make it always active repeat)
1
In an command block: tp @p 0 12 0 and you place the command block on the specific block down a pressuire plate
1
Well, Basically my question its not on special block, its on the located block, cuz my floor is all light gray wool, so that mean I will get teleported wherever I at, I want is if player standing on the located block, and not specific block, thanks
Example: execute if players on minecraft:light_gray_wool run tp @p -454 33 93 90 0 | X
execute if players on -487 33 107 run tp @p -454 33 93 90 0 | O
Example: execute if players on minecraft:light_gray_wool run tp @p -454 33 93 90 0 | X
execute if players on -487 33 107 run tp @p -454 33 93 90 0 | O
2
Satben, dont use storms example, it is inefficient and likely overcomplicated for what you want to do, no offense storm. Using 3 @e selectors in 1 line is not good.
FOR EXECUTING IF PLAYER IS STANDING ON A CERTAIN TYPE OF BLOCK:
execute as @a at @s if block ~ ~-0.1 ~ minecraft:light_gray_wool run tp @s -69 10 69
FOR EXECUTING IF THE PLAYER IS AT A CERTAIN COORDINATE:
execute as @a at @s if entity @s[x=-487,y=33,z=107] run tp @s -454 33 93 90 0
FOR EXECUTING IF PLAYER IS STANDING ON A CERTAIN TYPE OF BLOCK:
execute as @a at @s if block ~ ~-0.1 ~ minecraft:light_gray_wool run tp @s -69 10 69
FOR EXECUTING IF THE PLAYER IS AT A CERTAIN COORDINATE:
execute as @a at @s if entity @s[x=-487,y=33,z=107] run tp @s -454 33 93 90 0
2
Here is some code I used for my datapack but you will want to edit it a bit.
execute as @e at @e if block ~ ~ ~ minecraft:dirt_path run effect give @e[type=#faster_paths:ridable,distance=..0.3] minecraft:speed 1 0 true
execute as @e at @e if block ~ ~ ~ minecraft:dirt_path run effect give @e[type=#faster_paths:ridable,distance=..0.3] minecraft:speed 1 0 true
1
I have a tag for anything that the player can ride, so you might want to switch that to type=player and also you will want to have it as if block ~ ~-1 ~ minecraft:light_gray_wool instead and also replace effect with tp.
1
Oh wait, I just realized that you already have coords for the block, use those instead and make sure it is the coords of the block not you, so if you are standing at y=12 while on the block, then you will want the coords for the block to be 11.
1
Ok, I tested, But...why the command block tp me always whatever where I at?
1
Oh I know what you mean now. You didn't really read my last comment before yours. Instead of ~ ~-1 ~ you want the coords of the block you want to be teleported from. Make sure that is the block's coords and not your coords, so if your standing on the block then the y coord will be 1 less than your y coord.