mojira.dev
MC-302701

/stopwatch query does not work well with /execute store

First of all I want to say the new stopwatch command is very appreciated and I love to be able to replace jank in my code, like (ab-)using the worldborder for something like this. πŸ’œ

The Bug

The /stopwatch query command does not return a useful value for command output. While simple testing whether a specific time has been reach is easily doable with the new /execute if stopwatch sub command, this is not sufficient for displaying elapsed time to the player, for example in an actionbar timer.

Since according to the changelog the intend is to replace the /worldborder functionality fully, I believe this has not been achieved yet.

Functionality to obtain fractional seconds would also be required here, for example by adding an optional [<scale>] argument. This was possible before by setting the worldborder to change more than one block per second. I agree that ms as the finest granularity should be sufficient.

Currently, the β€œbest” way to do this with the stopwatch command would be to setup a command block with a stopwatch <id> query command and parse its command output, which isn’t ideal πŸ˜‰

Steps to Reproduce

  1. Set up a stopwatch: /stopwatch neun:test create

  2. Set up a scoreboard objective: /scoreboard objectives add stopwatch dummy

  3. Make it visible in the sidebar: /scoreboard objectives setdisplay sidebar stopwatch

  4. Query the stopwatch and save the result to your scoreboard: /execute store result score $time stopwatch run stopwatch neun:test query

Observed Result

The value on the scoreboard is always 1 (if your stopwatch exists)

Expected Result

The elapsed time is saved to the scoreboard

Linked issues

Comments 1

Thank you for your report!
After consideration, the issue is being closed as Invalid.

You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The official Minecraft feedback site or visit the Minecraft Feedback Discord server.

Quick Links:
πŸ““ Bug Tracker Guidelines – πŸ’¬ Community Support – πŸ“§ Mojang Support (Technical Issues) – πŸ“§ Microsoft Support (Account Issues)
πŸ““ Project Summary – ✍️ Feedback and Suggestions – πŸ“– Game Wiki

NeunEinser

(Unassigned)

Confirmed

Commands

25w41a

Retrieved