#how to store data?
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
What do you mean "store data"? What are you trying to do?
K wait
Do you want to store an score in the storage or entity?
IM SO SORRY FOR TAKING SO LONG
Idk alot about datapacks but my friend does he and me are creating a skill menu
•Archery •Fighting •Enchanting
•Alchamy •Farming •Mining •Fishing
•Excavation •Defense •Agiltiy
We want to score the Levels
@nocturne robin
im here
So can you help me?
This
What exactly is your problem?
we dont know how to store them
Yes you'll probably want to use a scoreboard
Yeahh we are using scoreboard
well, I'll start with the fact that the gui command has not yet been added to the datapacks, so to show the gui to the player, the player must click on the barrel/minecart/something else himself
So what is the actual problem?
Yeah we actually made that with a minecart but the problem is we dont know how to make it edit the score of the things
scoreboard objectives . . .
- ...
list - ...
add <objective> <criteria> [<displayName>] - ...
remove <objective> - ...
setdisplay <slot> [<objective>] - ...
modify <objective> displayname <displayName> - ...
modify <objective> rendertype (hearts|integer)
scoreboard players . . .
- ...
list [<target>] - ...
get <target> <objective> - ...
set <targets> <objective> <score> - ...
add <targets> <objective> <score> - ...
remove <targets> <objective> <score> - ...
reset <targets> [<objective>] - ...
enable <targets> <objective> - ...
operation <targets> <targetObjective> <operation> <source> <sourceObjective>
How do we change the lvl of items inside the minecart
NO
i cant get a screenshot
for example
Agility: Lv. 1
The items name is like that
and when the player gains a level it should be changed into lvl 2
How do we do that
You'll need to use an item modifier
How?
Awesome website with generators for almost everything. Also contains a technical changelog for new versions, guides on how to use some features, a performance report inspector and more!
Full list of generators: Loot Tables, Predicates, Item Modifiers, Advancements, Recipes, Text Components, Damage Types, Chat Types, Trim Materials, Trim Patterns, pack.mcmetas, Dimensions, Dimension Types, Biomes, Configured Carvers, Configured Features, Placed Features, Density Functions, Noise, Noise Settings, Structures, Structure Sets, Processor Lists, Template Pools, World Presets, Flat World Presets, World Settings, Block Tags, Entity Type Tags, Fluid Tags, Game Event Tags, Item Tags, Biome Tags, Structure Tags, Blockstates, Models, Fonts, Atlases
This can be used to generate the file
add some nbt to the items in the container, for example {archery_item:1b}, then as the player you can check that the player took this item using the command clear @s item{archery_item:1b} 0, clearing 0 of the quantity will simply return the number of items from the player, it can be written to the score using execute store result score , then check that the score is 1.. and add a level to the player or something else that the gui button should do
That won't work for setting the name of the item though
No you can't use advancements to change item names
what is the problem with putting a score in the name of an item?
Go to this website, generate an item modifier that changes the name and put it in data/<namespace>/item_modifiers/set_ability_name.json
@left drift which version are you on?
1.20.4
ok
Then you can modify the name using this command: item modify entity <gui minecart> container.<slot number> <namespace>:set_ability_name
Or you could use macros I guess
Does it work automatically when the scoreboard gains 1 level
No. you will need to update the item, but this is not a problem, because the item will be updated whenever you click on a button or create a minecart