Unless Ive come across a peculiar bug in the 1.9 release, command blocks set to "Conditional" will only output when the previous command blocks command is successful and is facing the same direction as itself.
Unless Ive come across a peculiar bug in the 1.9 release, command blocks set to "Conditional" will only output when the previous command blocks command is successful and is facing the same direction as itself.
It's not a bug. Conditional blocks check physically behind them, not the previous command block in the chain:
#4 is conditional and checks if #1 is successful, not #3.
(As a side-note, I'll eventually be rewriting this thread to include more technical details).
I was wondering if you knew how to set a chain command block that was preset to "always active"? I'm making something and this one thing will not work unless I use a "/setblock ~-3 ~0 ~0 chain_command_block 5 replace {Command:"COMMANDS"}". Each time I use this command, it always makes it "needs restone".
I was wondering if you knew how to set a chain command block that was preset to "always active"? I'm making something and this one thing will not work unless I use a "/setblock ~-3 ~0 ~0 chain_command_block 5 replace {Command:"COMMANDS"}". Each time I use this command, it always makes it "needs restone".
I have accidentally used a Repeat command block to teleport myself to a place where I can't turn it off, how can I get back, as it always teleports me back to where I was
I have accidentally used a Repeat command block to teleport myself to a place where I can't turn it off, how can I get back, as it always teleports me back to where I was
BTW I am in the air I can't place anything
Funny enough, I've made this mistake twice, once being with a kill command that killed me for all eternity. My only option was to use MC-Edit to delete the command, but if you know the coordinates of the command block you made, try doing /setblock X Y Z air.
I tried type this command in to an impulse command block: /playsound minecraft:entity.ghast.death master Lord_Magnificent ~ ~ ~ 10 0, I set it to conditional and all the command blocks behind it were operational. I set it to 'Always Active', and it came up with nothing. I just want the sound to play once. Help!
I tried type this command in to an impulse command block: /playsound minecraft:entity.ghast.death master Lord_Magnificent ~ ~ ~ 10 0, I set it to conditional and all the command blocks behind it were operational. I set it to 'Always Active', and it came up with nothing. I just want the sound to play once. Help!
The setup described works for me. Do you get any error messages?
You can stand on top of that command block and run "/blockdata ~ ~-1 ~ {}" to see its data. You'd be looking for the "conditionMet" tag, and if it's 0, that means the command block physically behind it was not successful in execution.
The setup described works for me. Do you get any error messages?
You can stand on top of that command block and run "/blockdata ~ ~-1 ~ {}" to see its data. You'd be looking for the "conditionMet" tag, and if it's 0, that means the command block physically behind it was not successful in execution.
All previous command blocks have the data tag "conditionMet:1b" except for the Impulse command block. What?
All previous command blocks have the data tag "conditionMet:1b" except for the Impulse command block. What?
Only the single command block behind the conditional block is checked, not all of them. Check the "SuccessCount" tag of the command block behind the impulse; if it's 0 then that command block did not succeed and the impulse block cannot run its command as a result.
Only the single command block behind the conditional block is checked, not all of them. Check the "SuccessCount" tag of the command block behind the impulse; if it's 0 then that command block did not succeed and the impulse block cannot run its command as a result.
The command block behind the impulse command block has the dataTag "SuccessCount:1". I am completely bewildered.
All details:
I have a testfor running on an always active, unconditional, repeat command block.
The goal is to have the last command block only activate a single time, right? An Impulse block set to Always Active is only going to execute its command a single time, which would be when you set it to Always Active. It won't be able to run its command after that point.
You would need to use another Chain block (or potentially a Repeating block, though that may cause a tick of delay), but if your goal is to only have it activate a single time, then it won't be that simple. If that is your goal I can come up with something later tonight, as I've gotta go now. One method would be to indeed use an Impulse block, but you'd have to use multiple Chain blocks in your original clock in order to toggle the "auto" tag (where "auto:1" means "Always Active", which will trigger the Impulse block the single time).
The goal is to have the last command block only activate a single time, right? An Impulse block set to Always Active is only going to execute its command a single time, which would be when you set it to Always Active. It won't be able to run its command after that point.
You would need to use another Chain block (or potentially a Repeating block, though that may cause a tick of delay), but if your goal is to only have it activate a single time, then it won't be that simple. If that is your goal I can come up with something later tonight, as I've gotta go now. One method would be to indeed use an Impulse block, but you'd have to use multiple Chain blocks in your original clock in order to toggle the "auto" tag (where "auto:1" means "Always Active", which will trigger the Impulse block the single time).
1. Testing if a condition is true (in this case, if there is a player nearby).
/testfor @a[r=5]
2. A conditional block that will set the Impulse block's "auto" tag to 1, which activates the command block if "auto" was 0 previously. This will occur every tick that /testfor is successful, but that won't matter because if "auto" is already 1 for an Impulse block, it will not activate the block again.
/blockdata X Y Z {auto:1b}
3. Testing the "SuccessCount" value of the /testfor command block. If it's 0, that means the command failed, and the Impulse block needs to have its "auto" tag set back to 0 so that it can activate in the future if /testfor succeeds.
/testforblock X Y Z minecraft:repeating_command_block -1 {SuccessCount:0}
4. A conditional block that sets the Impulse block's "auto" tag to 0, which only occurs if the /testfor block had a "SuccessCount" of 0 (meaning /testfor failed).
/blockdata X Y Z {auto:0b}
5. The Impulse block. An example command that you'll only see once when the /testfor command succeeds the first time. Moving away and back in allows it to run again.
NIce explanation. I didn't know how it worked. I tried by myself and I couldn't. Thanks for the explanation.
Unless Ive come across a peculiar bug in the 1.9 release, command blocks set to "Conditional" will only output when the previous command blocks command is successful and is facing the same direction as itself.
It's not a bug. Conditional blocks check physically behind them, not the previous command block in the chain:
#4 is conditional and checks if #1 is successful, not #3.
(As a side-note, I'll eventually be rewriting this thread to include more technical details).
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 want a delay between each command block without the need for repeaters - how do I do that?
Very very good
thanks, helpful explaination
How can i use now the comparator more than 1 time?
i have to replace? how?
there's any way to not replace all time? i'll need create a command block just for replace the comparator?
Ohh I DID IT !
The front light of comparator need to be deactived...
But how setblock a redstone comparator? or repeater?
I was wondering if you knew how to set a chain command block that was preset to "always active"? I'm making something and this one thing will not work unless I use a "/setblock ~-3 ~0 ~0 chain_command_block 5 replace {Command:"COMMANDS"}". Each time I use this command, it always makes it "needs restone".
You'll need to set the "auto" tag to 1:
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/
DUDE! Thanks a bunch!
I have accidentally used a Repeat command block to teleport myself to a place where I can't turn it off, how can I get back, as it always teleports me back to where I was
BTW I am in the air I can't place anything
Funny enough, I've made this mistake twice, once being with a kill command that killed me for all eternity. My only option was to use MC-Edit to delete the command, but if you know the coordinates of the command block you made, try doing /setblock X Y Z air.
the addition sure makes one commands shorter/smaller
idk how to use these. lolololololol
Diamonds in the sky!
I tried type this command in to an impulse command block: /playsound minecraft:entity.ghast.death master Lord_Magnificent ~ ~ ~ 10 0, I set it to conditional and all the command blocks behind it were operational. I set it to 'Always Active', and it came up with nothing. I just want the sound to play once. Help!
The setup described works for me. Do you get any error messages?
You can stand on top of that command block and run "/blockdata ~ ~-1 ~ {}" to see its data. You'd be looking for the "conditionMet" tag, and if it's 0, that means the command block physically behind it was not successful in execution.
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/
All previous command blocks have the data tag "conditionMet:1b" except for the Impulse command block. What?
Only the single command block behind the conditional block is checked, not all of them. Check the "SuccessCount" tag of the command block behind the impulse; if it's 0 then that command block did not succeed and the impulse block cannot run its command as a result.
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/
The command block behind the impulse command block has the dataTag "SuccessCount:1". I am completely bewildered.
All details:
I have a testfor running on an always active, unconditional, repeat command block.
/testfor Lord_Magnificent {SelectedItemSlot:8,Inventory:[{Slot:0b,tag:{display:{Name:"Rage Spell"}}}]}
Next, I have a conditional, always active, chain command block that has a dummy scoreboard that adds a point to a specific arrow.
/testfor Lord_Magnificent {SelectedItemSlot:8,Inventory:[{Slot:0b,tag:{display:{Name:"Rage Spell"}}}]}
And lastly, I have an conditional, always active, impulse command block that executes the prior arrow.
/execute @e[type=Arrow,score_RageSpell_min=1] ~ ~ ~ /summon AreaEffectCloud ~ ~ ~ {Color:6830447,Radius:4,Duration:36,Effects:[{Id:5,Amplifier:2,Duration:2},{Id:1,Amplifier:2,Duration:2}]}
The goal is to have the last command block only activate a single time, right? An Impulse block set to Always Active is only going to execute its command a single time, which would be when you set it to Always Active. It won't be able to run its command after that point.
You would need to use another Chain block (or potentially a Repeating block, though that may cause a tick of delay), but if your goal is to only have it activate a single time, then it won't be that simple. If that is your goal I can come up with something later tonight, as I've gotta go now. One method would be to indeed use an Impulse block, but you'd have to use multiple Chain blocks in your original clock in order to toggle the "auto" tag (where "auto:1" means "Always Active", which will trigger the Impulse block the single time).
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 for your help, I really appreciate it.
Alright, here's an example using that method.
1. Testing if a condition is true (in this case, if there is a player nearby).
2. A conditional block that will set the Impulse block's "auto" tag to 1, which activates the command block if "auto" was 0 previously. This will occur every tick that /testfor is successful, but that won't matter because if "auto" is already 1 for an Impulse block, it will not activate the block again.
3. Testing the "SuccessCount" value of the /testfor command block. If it's 0, that means the command failed, and the Impulse block needs to have its "auto" tag set back to 0 so that it can activate in the future if /testfor succeeds.
4. A conditional block that sets the Impulse block's "auto" tag to 0, which only occurs if the /testfor block had a "SuccessCount" of 0 (meaning /testfor failed).
5. The Impulse block. An example command that you'll only see once when the /testfor command succeeds the first time. Moving away and back in allows it to run again.
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/