1
Multiple Scoreboards
Can this be done for single player? Was hoping to keep track of how many blocks were mined of different blocks. I had my original scoreboard working until I tried adding additional scoreboards.
10
You can actually use minecraft's own statistics to keep track of the blocks you mine or pick up or use. On advancements and predicates, there is an option to check a stat. You can check for exact value or range between two values.
Thanks. I know minecraft kept stats of somethings, but not how much of every kind of block. I'll have to look into this a bit more because if so, this will help immensely.
Fixed! Not sure what exactly was the problem. Oddly nothing was wrong with the main code. The load.json and the setup file were not connecting for some reason. I copied the code from the setup file, deleted the pack and created a new one. Now to test a few things and see if I can actually get the scoreboard counting mined blocks.
I made a scoreboard to show the player how many times they had mined certain blocks. Dirt, Sand, Gravel, Clay, Coarse Dirt and Red Sand.
scoreboard objectives add goals dummy "Goals"
I created 6 players, each with one of the names of the blocks mentioned and gave them a score of 0.
scoreboard players add Dirt goals 0
scoreboard players add Sand goals 0
scoreboard players add Gravel goals 0
scoreboard players add Clay goals 0
scoreboard players add Red_Sand goals 0
scoreboard players add Coarse_Dirt goals 0
Then set up display.
scoreboard objectives setdisplay sidebar goals
Everything worked up to this point. The scoreboard displayed but of course did not count or do anything yet.
Now I went and created 6 more scoreboards not to be displayed, just to gather stats behind the scene.
scoreboard objectives add dirt minecraft.mined:minecraft.grass_block
scoreboard objectives add sand minecraft.mined:minecraft.sand
scoreboard objectives add gravel minecraft.mined:minecraft.gravel
scoreboard objectives add clay minecraft.mined:minecraft.clay
scoreboard objectives add red_sand minecraft.mined:minecraft.red_sand
scoreboard objectives add coarse_dirt minecraft.mined:minecraft.coarse_dirt
This is where things stopped working. Even what I had working stopped working. Running the command /scoreboard objectives list shows no objectives.
Also I get these 5 warnings from the output log.
Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
The plan was to get these 6 stats and give them to the variables (fake players) for display. However, I haven't gotten that far yet because what I have done so far isn't working.
Thanks for taking a look at all this.
scoreboard objectives add goals dummy "Goals"
I created 6 players, each with one of the names of the blocks mentioned and gave them a score of 0.
scoreboard players add Dirt goals 0
scoreboard players add Sand goals 0
scoreboard players add Gravel goals 0
scoreboard players add Clay goals 0
scoreboard players add Red_Sand goals 0
scoreboard players add Coarse_Dirt goals 0
Then set up display.
scoreboard objectives setdisplay sidebar goals
Everything worked up to this point. The scoreboard displayed but of course did not count or do anything yet.
Now I went and created 6 more scoreboards not to be displayed, just to gather stats behind the scene.
scoreboard objectives add dirt minecraft.mined:minecraft.grass_block
scoreboard objectives add sand minecraft.mined:minecraft.sand
scoreboard objectives add gravel minecraft.mined:minecraft.gravel
scoreboard objectives add clay minecraft.mined:minecraft.clay
scoreboard objectives add red_sand minecraft.mined:minecraft.red_sand
scoreboard objectives add coarse_dirt minecraft.mined:minecraft.coarse_dirt
This is where things stopped working. Even what I had working stopped working. Running the command /scoreboard objectives list shows no objectives.
Also I get these 5 warnings from the output log.
Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
The plan was to get these 6 stats and give them to the variables (fake players) for display. However, I haven't gotten that far yet because what I have done so far isn't working.
Thanks for taking a look at all this.
Objectives cannot disappear, unless you used scoreboard objectives remove. If you mean the /reload function didn't add the objectives, one of the following may have happened:
- You accidentally edited the load.json file to have illegal JSON. This includes mistakes such as forgetting/adding a comma, a bracket or a quotation mark.
- You misspelled the name of a function inside load.json. Perhaps you wrote minecraft: instead of your namespace.
- You wrote something illegal inside the file that adds the scoreboards. Perhaps you created a scoreboard with a too long name (>16 chars).
- You edited pack.mcmeta to contain something illegal. Perhaps you opened your world in a newer version and forgot to update pack_format.
- You accidentally moved a file to another folder. Perhaps you did it in purpose but forgot to update the references to that file.
- Your datapack got disabled somehow. Try /datapack list to see which datapacks are enabled and which are disabled.
Once again I ran into this problem. Everything working, then not working. Come to find out, I was putting # comments into the tick and load json files. json files don't except comments. I now know a little more. :)
Seem to have been a problem either with the load.json or something with the setup file's name or path. I could not figure it out so copied the code I done so far, deleted the pack and made a new one. Thanks for your help.
Like as One_Nose said, can you elaborate?
Do you mean you want a new scoreboard for every type of block mined?
Or do you want a scoreboard with multiple fake players with their own values, which is impossible for mining different blocks (unless you use the mined block criteria scoreboards and store it into another scoreboard)
Do you mean you want a new scoreboard for every type of block mined?
Or do you want a scoreboard with multiple fake players with their own values, which is impossible for mining different blocks (unless you use the mined block criteria scoreboards and store it into another scoreboard)
Can what be done for single player? Can you clarify?
