Hi! I used to play Minecraft version 1.12. But since I upgraded to 1.14, several commands are not functioning anymore.
Here is the specific one that I wish to make it work:
I simply need a redstone block to be set when the player walks on a specific coordinates.
It uses to work very well in 1.12 with this syntax:
Amusingly enough, I was bitten myself by the `as`/`at` clause of the execute command yesterday. And despite that, I didn't pinpoint a similar issue in your command. I definitively need a lot more practice with Minecraft commands!
Actually, in your case, I suspect the following commands would do the trick too:
execute as @a[x=-160,y=75,z=164,distance=..1] run setblock -153 75 165 redstone_block
execute if entity @a[x=-160,y=75,z=164,distance=..1] run setblock -153 75 165 redstone_block
According to my (very recent) knowledge in that matter, I would favor the `if entity` version: I think the `as`/`at` versions may be less efficient, since they may potentially run the `setblock` command several times, once for each matching entity. Or am I wrong?
Amusingly enough, I was bitten myself by the `as`/`at` clause of the execute command yesterday. And despite that, I didn't pinpoint a similar issue in your command. I definitively need a lot more practice with Minecraft commands!
Actually, in your case, I suspect the following commands would do the trick too:
execute as @a[x=-160,y=75,z=164,distance=..1] run setblock -153 75 165 redstone_block
execute if entity @a[x=-160,y=75,z=164,distance=..1] run setblock -153 75 165 redstone_block
According to my (very recent) knowledge in that matter, I would favor the `if entity` version: I think the `as`/`at` versions may be less efficient, since they may potentially run the `setblock` command several times, once for each matching entity. Or am I wrong?
I don't know about this.
But in my case, it doesn't matter, since my setblock command sets a redstone block that triggers a fill clock to another system.
I will keep that in mind though for other uses. Thanks for sharing this!
But in my case, it doesn't matter, since my setblock command sets a redstone block that triggers a fill clock to another system.
🎓
Indeed! At the risk of sounding pedantic , in CS we say such operation is idempotent: "[it] can be applied multiple times without changing the result beyond the initial application"
More seriously, I assume your goal was to trigger other command blocks execution with that redstone block. Could you tell me a little bit more about that or share a screenshot of such design? As I said previously, I'm new to all of this, and I would be curious to see how we can handle control structures or alternate branches of execution with Minecraft commands and command block chains.
Indeed! At the risk of sounding pedantic , in CS we say such operation is idempotent: "[it] can be applied multiple times without changing the result beyond the initial application"
More seriously, I assume your goal was to trigger other command blocks execution with that redstone block. Could you tell me a little bit more about that or share a screenshot of such design? As I said previously, I'm new to all of this, and I would be curious to see how we can handle control structures or alternate branches of execution with Minecraft commands and command block chains.
Hmmm, actually, I have a lot of mechanisms that I want to produce in my project.
But I'm not there yet, so it is difficult to demonstrate.
Here is my situation:
I'm building a huge adventure map in a previous version of Minecraft (1.2.5).
This is the version that I like... to terraform and do all the buildings of all areas involved.
Because I have my mods (worldedit, singleplayer commands and all my keyboard shortcuts) already installed like a portable application.
Once done, I will add all new blocks and items involved and the command block systems into my project.
----
All the mechanisms that I want to place are tested in a test map in the current minecraft version (first, i was playing 1.12 and now I am at 1.14.4)
I have a lot of them.
For example, with the detection command:
the player walks on a specific coordinate and it triggers the redstone block (as mentioned above).
This one activates a fill clock linked to another coordinate.
This next coordinate teleports the player to another place in the map (far away... like it is another map or world).
I can also link the redstone block to other clocks that control the time, the weather, the spawn point, the effects, or else.
It can also be linked to a locked gate (door) somewhere else. So the player needs to walk there to be able to go somewhere else.
I have a lot of them that can be linked together depending of my storyline.
I'm trying to combine my knowledge of mechanisms to create more complex systems that are coherent with my story.
----
To conclude, I cannot really answer your question accurately for now and I am sorry about it.
I'm trying to finish my buildings and then I will be more in the mechanism phase of my project. Then, I could demonstrate my stuff.
I had noticed earlier this week that one of the detection command (like the one shown on this thread) was no more functioning.
I wanted to correct this now, but I'm sure I will have plenty of other commands to re-adjust in the near future of my project.
**Hopefully, minecraft will be stable in the way of the syntax of the commands. I mean, I'm tired of all the changes when a new minecraft version is out! (ex: target selector distance instead of radius. But I know it is for a better use and it might be more efficient. Sincerely, I'm really not good in commands and programming languages. I have red and viewed a lot of tutorials. And now, I'm depending on my test map to make it succeed. I will need further help to make the whole thing work**
Hi! I used to play Minecraft version 1.12. But since I upgraded to 1.14, several commands are not functioning anymore.
Here is the specific one that I wish to make it work:
I simply need a redstone block to be set when the player walks on a specific coordinates.
It uses to work very well in 1.12 with this syntax:
execute @a[x=-160,y=75,z=164,r=1] ~ ~ ~ setblock -153 75 165 redstone_block
It doesn't work in 1.14. I tried this way, but without success:
execute @a[x=-160,y=75,z=164,distance=..1] ~ ~ ~ setblock -153 75 165 redstone_block
What is wrong with my command? Thanks for all help.
I'm not at all sure this is the only issue, but the keyword `run` in missing in your command:
Please, support the sledgehammer tool!
I ♥ Linux. Thanks Mojang for providing a game that runs natively on that OS!
Thanks for your reply. I have also tried this way (with the "run" as you shown), but it is not working.
There's something else, but I don't know.
Ouf!!!
The previous command that wasn't functioning was:
execute @a[x=-160,y=75,z=164,distance=..1] ~ ~ ~ run setblock -153 75 165 redstone_block
I just find out the correct syntax for this command. Here it is:
execute at @a[x=-160,y=75,z=164,distance=..1] run setblock -153 75 165 redstone_block
The "at" was important due to executing the command at all players that are positioned on the coordinates (-160 75 164).
And also, I removed the ~ ~ ~ position after the target selector and it worked!
Hopefully, the syntax will remain the same in next minecraft versions... All those changes are troubling my commands!
Thank you for having posted the solution!
Amusingly enough, I was bitten myself by the `as`/`at` clause of the execute command yesterday. And despite that, I didn't pinpoint a similar issue in your command. I definitively need a lot more practice with Minecraft commands!
Actually, in your case, I suspect the following commands would do the trick too:
According to my (very recent) knowledge in that matter, I would favor the `if entity` version: I think the `as`/`at` versions may be less efficient, since they may potentially run the `setblock` command several times, once for each matching entity. Or am I wrong?
Please, support the sledgehammer tool!
I ♥ Linux. Thanks Mojang for providing a game that runs natively on that OS!
I don't know about this.
But in my case, it doesn't matter, since my setblock command sets a redstone block that triggers a fill clock to another system.
I will keep that in mind though for other uses. Thanks for sharing this!
🎓
Indeed! At the risk of sounding pedantic , in CS we say such operation is idempotent: "[it] can be applied multiple times without changing the result beyond the initial application"
More seriously, I assume your goal was to trigger other command blocks execution with that redstone block. Could you tell me a little bit more about that or share a screenshot of such design? As I said previously, I'm new to all of this, and I would be curious to see how we can handle control structures or alternate branches of execution with Minecraft commands and command block chains.
Please, support the sledgehammer tool!
I ♥ Linux. Thanks Mojang for providing a game that runs natively on that OS!
Hmmm, actually, I have a lot of mechanisms that I want to produce in my project.
But I'm not there yet, so it is difficult to demonstrate.
Here is my situation:
I'm building a huge adventure map in a previous version of Minecraft (1.2.5).
This is the version that I like... to terraform and do all the buildings of all areas involved.
Because I have my mods (worldedit, singleplayer commands and all my keyboard shortcuts) already installed like a portable application.
Once done, I will add all new blocks and items involved and the command block systems into my project.
----
All the mechanisms that I want to place are tested in a test map in the current minecraft version (first, i was playing 1.12 and now I am at 1.14.4)
I have a lot of them.
For example, with the detection command:
the player walks on a specific coordinate and it triggers the redstone block (as mentioned above).
This one activates a fill clock linked to another coordinate.
This next coordinate teleports the player to another place in the map (far away... like it is another map or world).
I can also link the redstone block to other clocks that control the time, the weather, the spawn point, the effects, or else.
It can also be linked to a locked gate (door) somewhere else. So the player needs to walk there to be able to go somewhere else.
I have a lot of them that can be linked together depending of my storyline.
I'm trying to combine my knowledge of mechanisms to create more complex systems that are coherent with my story.
----
To conclude, I cannot really answer your question accurately for now and I am sorry about it.
I'm trying to finish my buildings and then I will be more in the mechanism phase of my project. Then, I could demonstrate my stuff.
I had noticed earlier this week that one of the detection command (like the one shown on this thread) was no more functioning.
I wanted to correct this now, but I'm sure I will have plenty of other commands to re-adjust in the near future of my project.
**Hopefully, minecraft will be stable in the way of the syntax of the commands. I mean, I'm tired of all the changes when a new minecraft version is out! (ex: target selector distance instead of radius. But I know it is for a better use and it might be more efficient. Sincerely, I'm really not good in commands and programming languages. I have red and viewed a lot of tutorials. And now, I'm depending on my test map to make it succeed. I will need further help to make the whole thing work**