To be honest, I'm familiar with the other aspects of the game but a horrible Noob at Redstone and Commands. I am making a map and need help with Command Blocks which have only been used for teleporting players. I was wondering if somehow I could use the /checkforblock command (I think thats what its called) to basically Check if a Beacon was placed (At a set of coordanites) with a Ore Pyrimad below it and if there was then it would teleport the player somewhere.
Maybe something like
/checkforblock Beacon (Coordanites)
If true then
/tp @a (Coordanites)
Anyway, could I do that in a Command Block?
Maybe something like
/checkforblock Beacon (Coordanites)
If true then
/tp @a (Coordanites)
Anyway, could I do that in a Command Block?
1
You're close. It's /testforblock. You can do this in an always active repeat command block.
/testforblock (coordinates) beacon.
Then do a chain, conditional, always active command block with this command.
/tp @p[tag=!tp] (coordinates).
Then finally do this command in a chain,conditional, always active.
/scoreboard players tag @p add tp.
This is just to make sure that you aren't constantly teleported to the spot. If you need to reset it, run this command.
/scoreboard players tag @p remove tp.
/testforblock (coordinates) beacon.
Then do a chain, conditional, always active command block with this command.
/tp @p[tag=!tp] (coordinates).
Then finally do this command in a chain,conditional, always active.
/scoreboard players tag @p add tp.
This is just to make sure that you aren't constantly teleported to the spot. If you need to reset it, run this command.
/scoreboard players tag @p remove tp.
