#Iterating existing tag names within ServerEvents.tags

3 messages · Page 1 of 1 (latest)

tame bloom
#

I am trying to dynamically create new tags by filtering existing ones (e.g., finding all #chipped:X tags to create #modpack:chiseled/X), but I cannot find a way to list the current tag registry from within ServerEvents.tags('item', event). Attempting to use event.getRegistry() or similar calls results in a TypeError, as the PreTagEventJS object doesn't seem to expose the registry for querying. Is there a specific binding or method in KubeJS 6 to retrieve a list of all currently registered ResourceLocation tags so they can be processed and remapped?

topaz cobaltBOT
#

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

urban schooner
#
let tags = Ingredient.of('#chipped:X').itemIds.toArray()

i cant remember if its toArray() or toList()
you can also just directly iterate

Ingredient.of('#chipped:X').itemIds.forEach(tag => doSomething())