Research Categories

The research categories system manages the top-level organization of all research entries in the Thaumonomicon. Each category is a tab displayed in the research GUI and contains a collection of ResearchItem entries.

Package

thaumcraft.api.research

Static Registry

public static LinkedHashMap<String, ResearchCategoryList> researchCategories

A map of category key to ResearchCategoryList, maintained in registration order.

Methods

registerCategory

public static void registerCategory(String key, ResourceLocation icon, ResourceLocation background)

Registers a new research category. Must be called during FMLPostInitializationEvent — calling it earlier may result in the category being overwritten by Thaumcraft’s defaults.

Parameter Type Description
key String Unique identifier for the category (e.g., "BASICS", "AUROMANCY")
icon ResourceLocation Icon displayed on the category tab
background ResourceLocation Background texture for the category’s research grid

Localization key: tc.research_category.<key> (e.g., tc.research_category.BASICS).

getResearchList

public static ResearchCategoryList getResearchList(String key)

Returns the ResearchCategoryList for the given key, or null if not registered.

getCategoryName

public static String getCategoryName(String key)

Returns the translated category name via StatCollector.translateToLocal("tc.research_category."+key).

getResearch

public static ResearchItem getResearch(String key)

Searches all registered categories for a ResearchItem with the given key. Returns null if not found.

addResearch

public static void addResearch(ResearchItem ri)

Adds a ResearchItem to its designated category. Validates position conflicts for non-virtual research and updates the category’s display bounds. Overlapping research at the same displayColumn and displayRow is rejected with a FMLLog fatal error.

ResearchCategoryList

public class ResearchCategoryList

Holds category metadata and the map of research items it contains.

Fields

Field Type Description
minDisplayColumn int Leftmost column used by any research in this category
minDisplayRow int Topmost row used by any research in this category
maxDisplayColumn int Rightmost column used by any research in this category
maxDisplayRow int Bottommost row used by any research in this category
icon ResourceLocation Tab icon texture
background ResourceLocation Grid background texture
research Map<String, ResearchItem> Map of research key → ResearchItem

Constructor

public ResearchCategoryList(ResourceLocation icon, ResourceLocation background)

Registration Example

// In FMLPostInitEvent
ThaumcraftApi.registerCategory(
    "MYMOD",
    new ResourceLocation("mymod", "textures/research/my_icon.png"),
    new ResourceLocation("mymod", "textures/research/my_background.png")
);

ResearchItem myResearch = new ResearchItem(
    "MYMOD_ResearchKey",
    "MYMOD",
    new AspectList().add(Aspect.FIRE, 1).add(Aspect.AIR, 1),
    3,  // column
    1,  // row
    1,  // complexity
    new ResourceLocation("mymod", "textures/research/my_research.png")
);
myResearch.setPages(
    new ResearchPage("This is my research page text.")
).registerResearchItem();

Localization

Category names use the translation key pattern tc.research_category.<key>. Add entries to your lang file:

tc.research_category.MYMOD=My Mod Research