[MCPE-20981] /fill replace doesn't work when metadata for replace isn't specified Created: 05/Apr/17  Updated: 14/Aug/17  Resolved: 14/Aug/17

Status: Resolved
Project: Minecraft (Bedrock codebase)
Component/s: None
Affects Version/s: 1.1.0.0, 1.1.0.1, 1.1.0.9, 1.1.2.50, 1.1.3.1
Fix Version/s: 1.2.0.11

Type: Bug
Reporter: John
Resolution: Fixed Votes: 5
Labels: /fill, command

Issue Links:
Duplicate
is duplicated by MCPE-22420 Fill command is not working Resolved
is duplicated by MCPE-22510 Disappear the particlecommand and rep... Resolved
is duplicated by MCPE-22896 /fill command says invalid syntax er... Resolved
is duplicated by MCPE-22981 /fill doesn't work properly Resolved
is duplicated by MCPE-23066 Fill replace command not working Resolved
Confirmation Status: Confirmed
Platform: Tablet - Android - Lenovo A7
CHK:
ADO: 63373

 Description   

In flat world, the command "/fill 0 6 0 20 6 20 glass 0 replace air" doesn't work, it just shows: Invalid syntax



 Comments   
Comment by Villager#infinity [ 13/Jul/17 ]

@Katie Heart, Entering -1 data value for the air won't work. Example: /execute @e[type=arrow.skeleton] ~ ~ ~ detect ~ ~-1 ~ air -1 fill ~4 ~6 ~4 ~-4 ~ ~-4 air 0 destroy

this command won't work and when I enter this command in the command block and try to execute it, it says "invalid command". Before I update MCPE to 1.1.3 this command still work on my iPad Air 2. Fix it quick my world need commands!

Comment by Katie Heart [ 07/Jun/17 ]

Commenting on the part on why the data value is useful to not be included:

If someone, including custom map creators, wanted to replace all wool blocks in the affected with a different block (even air), they would have to do so currently by at least one command block per data value (16 if using all the colors) and then more logic if they need some execution to happen if any wool block was replaced (conditional part of a chained command block).

If you do keep it required, maybe have -1 be a wildcard for the data value of the block to replace?

Comment by Zeb [ 03/May/17 ]

Revised title to be more descriptive.

Comment by [Mojang] Mega_Spud (Jay Wells) [ 06/Apr/17 ]

Reopening this issue, as the command should work without the data value at the end.

Comment by [Mojang] Mega_Spud (Jay Wells) [ 05/Apr/17 ]

Thank you for your report!
However, this issue has been closed as Working as Intended.

Remember not all differences between game versions/platforms of Minecraft are bugs.

You need to add a data value for the 'air', just as you did for the glass. This command should work then (replace the tildes for your chosen coordinates):
/fill ~ ~ ~ ~ ~ ~ glass 0 replace air 0

If you need help or have a suggestion you might like to follow the community support link below.

Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Feedback – 📖 Game Wiki

Generated at Sat Jan 11 15:29:11 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.