The Meaning of Life, the Universe, and Everything.
Join Date:
2/11/2017
Posts:
662
Member Details
In 1.13, I am trying to test if a previous command block (anywhere in the world) failed to execute. I know that in 1.12, you could do this using the SucessCount nbt tag, but this doesn't seem to work in 1.13.
Rollback Post to RevisionRollBack
Remember those versions that minecraft pranked us with? Specifically:
Minecraft 2.0
Minecraft 1.VR-Pre1
Snapshot 15w14a
Minecraft 3D
Those are still downloadable! Watch this video for 2.0:
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.
In 1.13, I am trying to test if a previous command block (anywhere in the world) failed to execute. I know that in 1.12, you could do this using the SucessCount nbt tag, but this doesn't seem to work in 1.13.
What can be done in 1.12 should be able to be done in 1.13.
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.
*This is a 3rd edit because I entirely missed testing for NOT succeeding, but yes. I've figured this out-
Just wrote a whole reply and actually realized that you might just have your syntax wrong
I tested on an IMPULSE block directly below me that went off once (and failed).
/execute if block ~ ~-1 ~ minecraft:command_block{SuccessCount:0} run summon minecraft:lightning_bolt ~ ~ ~
it succeeded. I think the NBT spacing is now different.
The only thing that you must do for other command blocks is making sure that it's
/execute if block ~ ~-1 ~ minecraft:repeating_command_block{SuccessCount:0} run summon minecraft:lightning_bolt ~ ~ ~
or
/execute if block ~ ~-1 ~ minecraft:chain_command_block{SuccessCount:0} run summon minecraft:lightning_bolt ~ ~ ~
Also, neat note when I tested this. If you create a execute if command, and don't put any result after the detected item, it is basically the testfor command. It returns "test passed." That is mostly useless for instant response commands, but you can use a condition line system to help delay commands for a few ticks by lining up a set of command blocks with the same execute command. Place the result at the end of the line, and walla! The command is delayed by 1 tick each command block you placed between the result block.
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.
In 1.13, I am trying to test if a previous command block (anywhere in the world) failed to execute. I know that in 1.12, you could do this using the SucessCount nbt tag, but this doesn't seem to work in 1.13.
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
What can be done in 1.12 should be able to be done in 1.13.
Don't we have /execute store?
I have not yet learned how to properly use that command.
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
*This is a 3rd edit because I entirely missed testing for NOT succeeding, but yes. I've figured this out-
Just wrote a whole reply and actually realized that you might just have your syntax wrong
I tested on an IMPULSE block directly below me that went off once (and failed).
/execute if block ~ ~-1 ~ minecraft:command_block{SuccessCount:0} run summon minecraft:lightning_bolt ~ ~ ~
it succeeded. I think the NBT spacing is now different.
The only thing that you must do for other command blocks is making sure that it's
/execute if block ~ ~-1 ~ minecraft:repeating_command_block{SuccessCount:0} run summon minecraft:lightning_bolt ~ ~ ~
or
/execute if block ~ ~-1 ~ minecraft:chain_command_block{SuccessCount:0} run summon minecraft:lightning_bolt ~ ~ ~
Also, neat note when I tested this. If you create a execute if command, and don't put any result after the detected item, it is basically the testfor command. It returns "test passed." That is mostly useless for instant response commands, but you can use a condition line system to help delay commands for a few ticks by lining up a set of command blocks with the same execute command. Place the result at the end of the line, and walla! The command is delayed by 1 tick each command block you placed between the result block.
Thank You!
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
It might be worthwhile to create a block tag for command blocks in general, then you don't have to worry about the type of the command block.