So let's say that I've set up an differed item register:
private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, OpenResources.MOD_ID);
...and that I have registered a new item item with it:
public static final RegistryObject<Item> TEST = ITEMS.register("test", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)));
The normal way to include a tag - let's say for example I used the tag "forge:ingots/iron" - I would include a file at the path `<SRC FOLDER>/resources/data/forge/tags/items/ingots/` called "iron.json", and that json would look like this:
{"replace": false, "values": ["<MOD_ID>:test"]}
This is all to say that I understand how to do this normally.
What I don't know how to do, and can't seem to find after looking through the documentation and searches online, is how do add this tag programmatically - meaning from the Java source code itself.
I want to do this because I need to dynamically add tags for a mod I am working on.
Thanks in advance for any help anyone is willing to provide.