2
/fill command help 1.12.2 (discriminating blocks)
Hey guys.
I need help with using the /fill command in Java 1.12.2.
My question is if there is a way to discriminate or leave out certain types of blocks when using the /fill command. I've looked through several forums about this, and I can't find a solution. If there is a certain command threshold, can anyone post an example of this?
Please note: It would be helpful if this worked in 1.12.2.
Thx
I need help with using the /fill command in Java 1.12.2.
My question is if there is a way to discriminate or leave out certain types of blocks when using the /fill command. I've looked through several forums about this, and I can't find a solution. If there is a certain command threshold, can anyone post an example of this?
Please note: It would be helpful if this worked in 1.12.2.
Thx
4
I often find fill to be a less powerful version of WorldEdit, which I highly recommend using over vanilla Minecraft.
But after doing some snooping, try this :
What this does is that it should replace all the diamond blocks (57) in the selected area with melon blocks (103)
I haven't tested it out cuz I use World Edit, but you could try that. :)
But after doing some snooping, try this :
/fill 50 10 60 100 20 120 minecraft:melon_block 0 replace minecraft:diamond_blockWhat this does is that it should replace all the diamond blocks (57) in the selected area with melon blocks (103)
I haven't tested it out cuz I use World Edit, but you could try that. :)
Thx for replying. :))
Regarding the command you've posted I understand it but why would the end of melon_block be 0? Is this meant to be the ID of the block, or am I meant to use 0 at the end of the first block every single time?
Regarding the command you've posted I understand it but why would the end of melon_block be 0? Is this meant to be the ID of the block, or am I meant to use 0 at the end of the first block every single time?
The 0 represents the data value of the block, this is used to figure out what variant of the block you are wanting to use. As the melon_block doesn't have any other variants, I'm going to use wool as an example. White wool has a data value of 0, purple wool has a data value of 10, red wool has a data value of 14, etc. If you enable Advanced Tooltips with F3 + H, You can see what data value a block has when you hover your mouse over the item(It's the value to the right of the /). Here's an example command that places purple wool.
In the case that you are testing for a block and don't care about what the data value is, use * or -1.
With that said, data values are going to be removed in 1.13. They are fine to use for 1.12, but if you ever need to update your command, just remove the number/asterisk and update the id's of the blocks.
Hope this helps!
~SUPERIONtheKnight
/setblock ~ ~ ~ wool 10In the case that you are testing for a block and don't care about what the data value is, use * or -1.
/testforblock ~ ~ ~ wool *With that said, data values are going to be removed in 1.13. They are fine to use for 1.12, but if you ever need to update your command, just remove the number/asterisk and update the id's of the blocks.
Hope this helps!
~SUPERIONtheKnight
THANK YOU! It worked!
