The Meaning of Life, the Universe, and Everything.
Join Date:
2/11/2017
Posts:
662
Member Details
The conditional option in command blocks allows you to run a command only if the last command succeeded. This is very useful, but at times it may be desired to do the opposite. That is, run the command only if the last command didn't succeed. There are ways to do this, two popular ones being the reverse conditional and the "execute store" command.
The "execute store" command works with data packs. It will allow you to save the success status for later use.
Now, both of these solutions are good, but they have downsides. For one thing, they both require a second command (block) to run the reverse conditional. For another, the "execute store" command requires either a score, an entity, or a block with nbt to work. The last two are hard to obtain with data packs, and the first requires fairly advanced setup as well as increasing lag.
The reverse conditional only works with command blocks (not data packs) and requires you to track the relative position of the last command block to the current one as well as edit the command based on the type of command block. For an impulse command block directly under the current command block, the command would be this:
/execute if block ~ ~-1 ~ minecraft:command_block{SuccessCount:0} run ...
My suggestion would be able to compact the reverse conditional into one command, would work on both command blocks and data packs, and would not require any additional measures to work. It is quite simple.
Add the option to specify a command to run if the condition fails also.
The execute command syntax would be changed to this:
/execute <conditions> run <success command> else <fail command>
The fail command would run if the condition fails or if an error occurs during execution of the success command. Of course, the previous solutions would still work, but this would be a simple alternative. Specifying the fail command would be completely optional.
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
The conditional option in command blocks allows you to run a command only if the last command succeeded. This is very useful, but at times it may be desired to do the opposite. That is, run the command only if the last command didn't succeed. There are ways to do this, two popular ones being the reverse conditional and the "execute store" command.
The "execute store" command works with data packs. It will allow you to save the success status for later use.
Now, both of these solutions are good, but they have downsides. For one thing, they both require a second command (block) to run the reverse conditional. For another, the "execute store" command requires either a score, an entity, or a block with nbt to work. The last two are hard to obtain with data packs, and the first requires fairly advanced setup as well as increasing lag.
The reverse conditional only works with command blocks (not data packs) and requires you to track the relative position of the last command block to the current one as well as edit the command based on the type of command block. For an impulse command block directly under the current command block, the command would be this:
/execute if block ~ ~-1 ~ minecraft:command_block{SuccessCount:0} run ...
My suggestion would be able to compact the reverse conditional into one command, would work on both command blocks and data packs, and would not require any additional measures to work. It is quite simple.
Add the option to specify a command to run if the condition fails also.
The execute command syntax would be changed to this:
/execute <conditions> run <success command> else <fail command>
The fail command would run if the condition fails or if an error occurs during execution of the success command. Of course, the previous solutions would still work, but this would be a simple alternative. Specifying the fail command would be completely optional.
Remember those versions that minecraft pranked us with? Specifically:
Those are still downloadable! Watch this video for 2.0:
https://www.youtube.com/watch?v=PQdu9LKAdIU
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
15w14a is on this link:
http://minecraft.gamepedia.com/15w14a
1.RV-Pre1 is here:
http://minecraft.gamepedia.com/1.RV-Pre1
Minecraft 3D is here:
https://minecraft.gamepedia.com/Java_Edition_3D_Shareware_v1.34