Bedrock Edition; creative test world with command · 3 min read

Bedrock command blocks: a button, facing direction and a chain

Test the single message on the button, then add a second block. As long as the chain is not operated manually, the repeated operation only multiplies the error.

LonelyCraft editors · Updated

The player assembles a redstone mechanism in a wooden workshop
Illustration: a player assembles a redstone mechanism in a wooden workshop. This is an artistic scene, not a snapshot of a specific server.

Test one impulse command block

Create a separate flat creative world, enable command and get the block: /give @s command_block. Place it and open it. Select Impulse, Unconditional, Needs Redstone. Enter say Button works and attach the button. One click should give one message.

If there is silence, look at Previous Output in the interface. Check power, mode and command block resolution. Do not replace say with a complex item output until a simple test has been completed.

Add a chain block in the arrow’s direction

The arrow of the first block should point to the next one. For the second one, set Chain, Unconditional, Always Active, command say Chain works. When clicked, both messages should appear. Always Active on a chain block means it is ready to execute a chain step, not an independent timer.

Conditional executes a block only if the previous step in the chain succeeds. This is useful for checking a condition, but interferes with diagnostics if enabled accidentally. First confirm the direction and unconditional trigger, then add the conditional.

It is more convenient to store a long work sequence in a text file. command in function.

Two circuit test blocks
Revision diagram: two blocks for checking the circuit.Scroll the diagram horizontally.Open full-size diagram

Select recipient explicitly

In chat, @s is the player entering the command; the command block does not have such a player. For a short test, you can write execute as @p at @s run say Selected player. But the one closest to the block is not necessarily the one who pressed the button: with two participants, check the distances and selection area.

For a reward, first create an objective, then select participants by tag and exclude those who have already received it. Don't set give @a diamond to always-on Repeat: it will do it multiple times instead of once per press.

The paid label example protects against re-issuance. Counter and one-time reward.

Keep repeating commands controllable

Repeat executes the command multiple times. For the first test, select Needs Redstone and power the lever: it can be turned off. Specify Tick Delay if checking is not needed every tick. Don't start with teleportation or summon: an erroneous constant command prevents you from approaching and stopping it.

To complete the project, label the circuit input, trigger condition, and switch. In a copy of world, check the operation after exiting and returning: command blocks depend on the processing of the corresponding world area.

Frequently asked questions

Why is Chain silent?

Check the arrow of the previous block, Always Active and the accidentally turned on Conditional.

Repeat is executed once?

No, it repeats the command as long as the power and processing conditions of the block are met.

How to stop the test?

Use Repeat with Needs Redstone and lever; leave access to the switch in advance.

Views: … · One view per browser per day

Was this useful?Total score: …

One reaction per browser. Click again to remove it, or choose the other reaction.

Sources and documentation

constructioncommandblocks

Read on

Bedrock command blocks: a button, facing direction and a chain — Lonely Craft