#is it possible to iterate across item groups or tags?

14 messages · Page 1 of 1 (latest)

foggy sun
#

There is a mod that adds 100 ish pieces of armor, then just puts them all in modname:armor tag. I need to add the conventional tags that should be on each piece and am hoping to automate it.

Is it possible to make a call to a tag or a item group (#,%) and then iterate across the things in that tag. It doesn't seem possible as most actions are before tag registration until you issue a reload command....

echo mulchBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

rocky ferry
#
Ingredient.of('whatever').stacks.forEach(item => {})
Ingredient.of('whatever').itemIds.forEach(id => {})
foggy sun
#

not sure I understand what that is doing... then again I guess I don't need to. Will either work interchangeably or is there a separate use case? looks like stacks would be stackable non nbt items and ids would be things like armors?

rocky ferry
#

stacks is for ItemStack which has nbt and other data
itemIds is just a list of all IDs in whatever you look for, regex, tags, mod, etc

foggy sun
#

Thank you!

foggy sun
#

@rocky ferry Sorry to ping you, but it is a closed ticket. In Ingredient.of(stuff) I thought mods were accessable through the "@modname" like tags are "#tag` . is that not correct?

rocky ferry
#

it is correct, but depends on what kind of script

#

like client/server

foggy sun
#

aaahhhh.. ok I think I have it in the wrong place. I am doing server->tag event-> loop through mod item ids regexing id's with things like helmet and adding them to tag pool. Wait that should be server... what am I doing wrong here...

rocky ferry
#

i dont really see why that wouldnt work

#

should open a new ticket for that issue tho

foggy sun
#

Hah! I had id variable generate earlier in the code... me being dumb. Thank you for the help