Minecraft / data get block NBT problems?

br
- in Servers
5

I'm trying to get a score running that shows the current time on a server. This is not so easy to do as there's no criterion that specifies that…

So now I proceed in such a way that I have the time specified with the first command block (/ time query daytime) and with the aid of a second command block I read out the data and transfer it to a scoreboard.

It's not that difficult, first do an execute command with store result and then select the correct data with / data. No problem. I also know where to find the data…

My problem is: I don't know how to correctly state it. So the time is given at "LastOutput:" and then under "with": ["number"] … But since I don't really enjoy working with / data (or I just don't understand it yet), I don't know what I should specify the path. Or is there another way to read the number?

Can someone help me there or is that too specific for a good question?

Po

The criterion still exists, is just a little hidden:

/ scoreboard objectives add ticksPlayed minecraft.custom: minecraft.play_one_minute

Be

You can use / time query daytime instead of / data directly in the execute store command.

That would be:

/ execute store result score #time daytime run time query daytime

br

Thanks for the reply. But isn't this criterion actually for the playing time of individual players, not for the time of day? Did I miss a function of this criterion?

br

Thank you so much, how could I be so blind. This is of course much more efficient than I thought. Sometimes I think too much around the corner xD

Po

Yes, this is for gamers. I have probably misunderstood that.