mojira.dev
MC-131650

'void_air' testing with /execute doesn't work

The bug

If you tried to test void_air block with execute if/unless block ... command doesn't execute sub-command if the block can be edited. If you place yourself a void_air block with /setblock, the execute command works.This bug exists since void_air and cave_air was introduced in 18w06a.

Based on this information

How to reproduce

/execute if block 1000000 0 0 minecraft:void_air run tellraw @a "Unload block"

→ ❌ It fails

/execute unless block 1000000 0 0 minecraft:void_air run tellraw @a "Usable block"

→ ❌ It fails

 

If you test with cave_air, it work if you test in caves or not as expected.

Comments 5

Those commands only allow for loaded chunks to be checked; that it's internally void_air does NOT mean the command will say "oh the chunk is unloaded, so I should consider this void air", it's still outside of loaded regions, and as such the command says that said block cannot be found/checked.

Yes, but normally, if you test with if or unless, at least one of the conditions should be validated, ok if you don't want to activate testing with void_air, but validate unless condition for each coordinate outside loaded/valid chunk.

Because the command is not able to see in the chunk, it cannot say that it’s not the blocks, as it could be said block but just not loaded.
Accessing blocks outside of loaded chunks just makes commands fail.

Ok it's too bad, it would be a good feature to improve this command... :/

This bug has been fixed in 1.13.1-pre1, /execute if block/blocks now return if the chunk is not loaded and it can be used with /execute store. void_air is definitively useless.

Mondemen

(Unassigned)

Unconfirmed

Chunk, command, coordinates, execute, testing, void_air

Minecraft 1.13-pre2

Retrieved