I am trying to use the fill command, but it is not working
I am using this command and it is not working.
/fill 79 134 41 108 129 74 <dirt> <3> replace <coarse_dirt> <3:1>
It keeps saying that there is no such block as dirt. Why is this happening?
This is the output.
[09:36:49] There is no such block with name minecraft:
I am using minecraft 1.12.2
Solution 1:
The first thing which I think is confusing you is how a command's usage syntax is written, e.g:
fill <x1> <y1> <z1> <x2> <y2> <z2> <block> <dataValue|state> replace [replaceBlock] [dataValue|state]
The angled brackets < >
should not be put in the actual command, they're just there to indicate a required argument that you should replace with something.
Same applies to square brackets [ ]
which indicate an optional argument.
In contrast, words without any brackets around them (e.g: fill
, replace
) are to be typed literally, rather than replaced with your argument.
So removing the brackets we get:
fill 79 134 41 108 129 74 dirt 3 replace coarse_dirt 3:1
The other confusion is that the dataValue
is not the block's numeric ID (which have been phased out), but instead the block's metadata/"damage value". So instead of 3
for normal dirt it should be 0
, and instead of 3:1
for coarse dirt it'd be just the 1
. It'd be redundant to have to specify a block's string ID then its numeric ID. Fixing that should result in a working command:
fill 79 134 41 108 129 74 dirt 0 replace coarse_dirt 1
Additionally, it'd be good practice to replace the numeric dataValue
s with state
s:
fill 79 134 41 108 129 74 dirt default replace dirt variant=coarse_dirt