Is there a way to create a Minecraft scoreboard object that counts all kinds of stone?
Like:
/scoreboard objectives add stonecounter stats.useItem.1
/scoreboard objectives add stonebrickcounter stats.useItem.X
/scoreboard objectives add cobblestonecounter stats.useItem.XX
and then sum all the objectives to one allstonecounter
and display that number on the sideboard?
Something like:
/scoreboard objectives setdisplay sideboard (stonecounter+stonebrickcounter+cobblestonecounter)
Best Answer
You can use scoreboard operations to add one score to another.
Operations available:
+=
,-=
,*=
,/=
,%=
,<
,>
,><
,=
More information concerning scoreboards can be found here.
Prerequisites:
You will need another objective to hold the value:
Clock commands:
The following must be run in numerical order on a clock.
Reset all player's "stonetotal" score to 0. Without this, their score will constantly increase.
Cause all players to run the
/scoreboard
command, targeting their own scores. They will increment their "stonetotal" score equal to their respective stone scores.