Hey! Im learing "command blocks". then, I wonder, how do I detect blocks,entities, and players (I dunno if a player is an entity, and also how to make it do something when a player is in that area/block/special coords and I am making 3 maps, Skills,Lemming,and Bow Skills, which comes soon, (If someone helps me)
And also, I want to have a special code I can copy paste like this code for teleport : /teleport {player} x y z
+ Tell me about when I do use {} and when I use [] and , and = etc.
A command to have as a detect, to detect when someone/something is on that location, like a block or a amount of score, and executes like a setblock/fill/teleport, etc.
So for the players and entites it is easy. For exaple the coordinates are 50 72 39.
execute @e[50,72,39,r=1] ~ ~ ~ /tp @e[50,72,39,r=1] X Y Z
Put that in a clock.
And iif it is a placed block use
testforblock 50 72 39 stone
To test a stone block. Next to it a comparator and next to it a command block with any command you want to execute when the block is there. I hope it worked. If you need more help tell me.
So for the players and entites it is easy. For exaple the coordinates are 50 72 39.
execute @e[50,72,39,r=1] ~ ~ ~ /tp @e[50,72,39,r=1] X Y Z
Put that in a clock.
And iif it is a placed block use
testforblock 50 72 39 stone
To test a stone block. Next to it a comparator and next to it a command block with any command you want to execute when the block is there. I hope it worked. If you need more help tell me.
You should not be using /execute in that manner. It only serves to increase the amount of commands to process. Only use /execute when you need to change the origin or sender, which is not needed because /tp in this case already has a selector to use:
It won't make any difference in outcome. /execute does not change the function of the commands it runs. Without using /execute it is still a single command. By using /execute, you are causing all entities in that area to run separate commands; it exponentially increases the number of commands to process, which is very bad for performance. Only one /tp command needs to run.
It won't make any difference in outcome. /execute does not change the function of the commands it runs. Without using /execute it is still a single command.
So for the players and entites it is easy. For exaple the coordinates are 50 72 39.
execute @e[50,72,39,r=1] ~ ~ ~ /tp @e[50,72,39,r=1] X Y Z
Put that in a clock.
And iif it is a placed block use
testforblock 50 72 39 stone
To test a stone block. Next to it a comparator and next to it a command block with any command you want to execute when the block is there. I hope it worked. If you need more help tell me.
Hmm thanks, got it now, but is it possible to do so only in a specified mob/player gets teleported. If you dont understand, here is a little story
Zombie goes on the location>Nothing happens>Zombie goes away>Player comes>Get full armour
You could use a conditional command block in 1.9 or in a comparator in 1.8 to get an output.
Thanks. got it now, but @JannisX11 , do the armour stand have to have it feet (I know it can fly so,) or its head to make it get triggered? And thanks for Testforblock command,
this will test if all players have the certain block under them and if so , you will run that command only to the players who are standing on that block
Hmm thanks, got it now, but is it possible to do so only in a specified mob/player gets teleported. If you dont understand, here is a little story
Zombie goes on the location>Nothing happens>Zombie goes away>Player comes>Get full armour
Use the @a (all players) selector instead of @e (all entities):
Hey! Im learing "command blocks". then, I wonder, how do I detect blocks,entities, and players (I dunno if a player is an entity, and also how to make it do something when a player is in that area/block/special coords and I am making 3 maps, Skills,Lemming,and Bow Skills, which comes soon, (If someone helps me)
And also, I want to have a special code I can copy paste like this code for teleport : /teleport {player} x y z
+ Tell me about when I do use {} and when I use [] and , and = etc.
Thanks
-Adrizz
This is a really interessting page, you should definetly read it:
http://minecraft.gamepedia.com/Commands
My projects: https://blockbench.net/hub
Ok. um but what did I just tell you
What do you need exactly?
A command to have as a detect, to detect when someone/something is on that location, like a block or a amount of score, and executes like a setblock/fill/teleport, etc.
In a specify location? ok.
So for the players and entites it is easy. For exaple the coordinates are 50 72 39.
Put that in a clock.
And iif it is a placed block use
To test a stone block. Next to it a comparator and next to it a command block with any command you want to execute when the block is there. I hope it worked. If you need more help tell me.
Man, what are you doing?
You should not be using /execute in that manner. It only serves to increase the amount of commands to process. Only use /execute when you need to change the origin or sender, which is not needed because /tp in this case already has a selector to use:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
I made that to make it in one command but ok
It won't make any difference in outcome. /execute does not change the function of the commands it runs. Without using /execute it is still a single command. By using /execute, you are causing all entities in that area to run separate commands; it exponentially increases the number of commands to process, which is very bad for performance. Only one /tp command needs to run.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
If you want to detect a block, there are two ways.
The first one uses an armorstand.
Then you can uses this command, to detect the block:
The second way would be using testforblock.
You could use a conditional command block in 1.9 or in a comparator in 1.8 to get an output.
My projects: https://blockbench.net/hub
I know.
Hmm thanks, got it now, but is it possible to do so only in a specified mob/player gets teleported. If you dont understand, here is a little story
Zombie goes on the location>Nothing happens>Zombie goes away>Player comes>Get full armour
Thanks. got it now, but @JannisX11 , do the armour stand have to have it feet (I know it can fly so,) or its head to make it get triggered? And thanks for Testforblock command,
To test for a certain block do
/execute @a ~ ~ ~ detect (block) ~ ~-1 ~ /(command)
this will test if all players have the certain block under them and if so , you will run that command only to the players who are standing on that block
Use the @a (all players) selector instead of @e (all entities):
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Thanks!
[Anyone who can close threads, plz do it]
I can report you to cancel the thread but why?