mojira.dev
MC-181359

Some commands don't work and/or don't display results in chat, and command blocks with the same input don't work/output incorrect results

UPDATE: While playing the problem world today, I was looking for a command using the suggested commands list in /gamerule, and by chance happened to notice /gamerule sendCommandFeedback. I entered it without setting it to either true or false so that it would tell me what mode it was currently in, and nothing happened. I then set it to true, and now all of my commands give feedback in chat as they're supposed to.

I suppose this issue should be closed now, as I believe the main issue was caused by user error. The command blocks producing incorrect output is still an issue though, and I may open a new report to include it and simplify things.

______

 

I don't know if I can describe this well, but I'll do my best.

As the title says, some commands either don't work or don't display results in chat like they should, but only on certain worlds. For example I was trying to create a scoreboard that showed me how many villagers were in my village at any given moment, using this process:

  • /scoreboard objectives add entity_count dummy

  • (after which chat displayed "Created new objective [entity_count]"

  • /scoreboard objectives setdisplay sidebar entity_count

  • after which chat displayed "set display slot sidebar to show objective entity_count"

Then I ran this command to make my scoreboard track how many villagers there were.

  • /execute store result score @s entity_count run execute if entity @e[type=minecraft:villager]

  • after which chat displayed "Test passed, count [number of villagers]"

I then put the above /execute command into a command block, set to "always active" and "repeating" to track the number of villagers in real time. I then tested it by adding villagers via spawn eggs, and immediately after each one was spawned, the number of the scoreboard went up by 1, as was expected.

I tested this in a freshly created world, in snapshot 20w17a, and it worked perfectly. I then went to another world, also created in the snapshot, and repeated the exact same above steps, and two problems occurred:

  • The scoreboard commands would work, but chat did not display them.
    so after the first command used to add a scoreboard objective, I should've seen chat display "Created new objective [entity_count]", but I didn't. I confirmed the command had worked by typing in the command again, and luckily chat decided to display the error "an objective already exists by that name".

  • After blindly typing all the previous commands in order, getting no output in chat (except when entering the /execute command, the scoreboard appeared as it should and displayed the results of the command, though chat still did not display "test passed, [number of villagers]", I then put the /execute command into a command block as I did before, with the same settings, but this time the command block did not function except to display in chat "command set: [command I entered]". I tested this by spawning villagers with spawn eggs, and the number in the scoreboard did not go up at all unless I manually typed the /execute command after I spawned each villager. If I looked at the command block's GUI again, the output box was blank, as if the command block had never run the command.  Update: Now the command block consistently outputs the error "No entities were found" even if manually typing the same command returned the correct number of villagers. I created a new world and went through all the steps again, and the command block no longer works in any world, though an hour ago it worked perfectly fine. I have no idea what could've changed, and I've since tried at least four freshly generated worlds to test it, with the same result. I'm quite bamboozled.

 

I also tried changing the command block to "needs redstone" and powering it, but it still did not work. After googling for a bit, I've discovered that this second problem I've outlined seems to have existed in the game for a while, as I found some older bug reports from versions as early as 1.13 describing a similar, but not quite the same, issue (seeing as it is still happening, this current report is needed). However I haven't seen any reports for the first problem I outlined, and the two occurred together in my testing, so I assume they're related.

As for the world these problems occurred in, I tried recreating it using the same seed to see if it was limited to the individual save file, and continued to have the same issues, so it seems to be linked to the seed. (Except that after I typed this, all worlds started having the same command block output issue, instead of just the one, though manual command output in chat still works in those worlds but not in this one.)

If there's anything else I can do to test this bug and provide more information, let me know and I'll put the results here.

I also tried using the new /attribute commands added in the snapshots. They also failed when I used them in the world that had the above problems.

 

Summary: Commands seem to work, but in some worlds, they don't display results in chat like they should, so commands that solely return output in chat are useless. In the same worlds that have this problem, some commands don't work (either displaying no output, or incorrect output) when put into a command block, and while other worlds at first handled the same thing just fine, after a while they have all displayed the same issue, even when freshly generated.

 

Comments 1

For command feedback, please make sure the button next to the output textfield is an O, not an X

TorandoChaser

(Unassigned)

Unconfirmed

(Unassigned)

20w17a

Retrieved