This bugpost is not about forcing success if you /setblock or /fill an already-existing block( s ), but about changing the somewhat imprecise error message "The block couldn't be placed." (Since 17w46a: ) "Could not set the block.".
Furthermore, the message is inconsistent with the one for /fill in a similar setup: "No blocks filled".
As by now also the error messages for commands improved greatly, I feel the error message for this case should also be changed, as the output is "too vague".
Test setups for /setblock
If I try to set an air block where there is nothing, basically "already air", it gets me the error message "The Block couldn't be placed." (Since 17w46a: ) "Could not set the block."
/setblock ~ ~ ~ minecraft:air/setblock ~ ~ ~ minecraft:airThe same also goes for e.g. a naturally spawned white/yellow sandblock, if you stand on it and do
/setblock ~ ~-1 ~ minecraft:sand/setblock ~ ~-1 ~ minecraft:sandand even if you insert its (currently still in the game) datavalue like so:
/setblock ~ ~-1 ~ minecraft:sand 0/setblock ~ ~-1 ~ minecraft:sand 0then it still gives you that error message.
Wouldn't it make more sense/be more precise to output an error message along the lines of e.g.:
"Same block already at destination" or "No block changed" or similar?
Inconsistency with error message for /fill
If you try to /fill an area that you already filled before with stone, again with stone, you get at least the error message displayed in the command block: "No blocks filled."
If you try to fill just a single block that you already filled before with stone, again with stone, you get a different error message displayed in chat than the /setblock-error message: "No blocks filled."
This bugpost is not about forcing success if you /setblock or /fill an already-existing block( s ), but about changing the somewhat misleading or inconsistent error message "The block couldn't be placed.". It would be maybe better for both beginners in CBing, as well as advanced CBers for debugging their maps/contraptions, if the (error) message would be more precise, like suggested above, and maybe also consistent with the /fill-message, if the Devs think this would be better for CBers.
Attachments
Comments 16
@unknown Fair enough, but it's not about a "workaround so it renders success without throwing an error", but really just about the (from my perspective) misleading error message itself, even more considering that those error messages were highly improved.
But I just saw FVbico closed it as invalid, and I trust you guys you know what you're doing/saying.
Aside from that, it's a rather small thing, so I'm not insisting 😉
Have a good week, y'all.
I have to disagree that it would be a feature request, as I'm asking for consistency with other, better explained, error messages. Although you can't 100% compare it, it also was not seen as feature request that the word "white" was added to regular wool etc. >;]
But like I said, I won't insist, it's not important enough for me, I was just worried that CB newbies might be puzzled, that's all 🙂
Take care.
Well, asking for a different error message is considered more a request; white not being mentioned was inconsistent with other colored blocks.
Anyway, I'll stop this here.
lol 😉 thanks on behalf of my CB-beginners-weak heart 😉
I'll add a bit more info into the OP when I'm back from jogging and breakfast, and did some testing with /fill 🙂
/setblockhas always worked this way. If you want to force success (even when the blocks are the same), you can try/setblock ~ ~ ~ air default destroy.