Research (Thaumcraft)
Description
Create or modify existing research entries, which contain helpful information and unlock recipes, and can be gated behind specific items or events.
Identifier
Refer to this via any of the following:
mods.thaumcraft.research/* Used as page default */
mods.thaumcraft.Research
mods.tc.research
mods.tc.Research
mods.thaum.research
mods.thaum.Research
Adding Recipes
Adds Categories in the format
key
,researchkey
,formula
,icon
,background
:groovymods.thaumcraft.research.addCategory(String, String, AspectList, String, String)
Adds Categories in the format
key
,researchkey
,formula
,icon
,background
,background2
:groovymods.thaumcraft.research.addCategory(String, String, AspectList, String, String, String)
Adds a new location to check for research:
groovymods.thaumcraft.research.addResearchLocation(ResourceLocation)
Adds a new location to check for research:
groovymods.thaumcraft.research.addResearchLocation(String)
Adds a new location to check for research:
groovymods.thaumcraft.research.addResearchLocation(String, String)
Adds a new scannable block:
groovymods.thaumcraft.research.addScannable(Block)
Adds a new scannable enchantment:
groovymods.thaumcraft.research.addScannable(Enchantment)
Adds a new scannable material:
groovymods.thaumcraft.research.addScannable(Material)
Adds a new scannable potion:
groovymods.thaumcraft.research.addScannable(Potion)
Adds a new scannable block in the format
researchKey
,block
:groovymods.thaumcraft.research.addScannable(String, Block)
Adds a new scannable entity in the format
researchKey
,entityClass
,inheritedClasses
:groovymods.thaumcraft.research.addScannable(String, Class<?>, boolean)
Adds a new scannable entity in the format
researchKey
,entityClass
,inheritedClasses
,tags
:groovymods.thaumcraft.research.addScannable(String, Class<?>, boolean, ThaumcraftApi.EntityTagsNBT)
Adds a new scannable item in the format
researchKey
,item
:groovymods.thaumcraft.research.addScannable(String, ItemStack)
Adds a new scannable material in the format
researchKey
,material
:groovymods.thaumcraft.research.addScannable(String, Material)
Example
mods.thaumcraft.research.addResearchLocation(resource('thaumcraft:research/new.json'))
mods.thaumcraft.research.addScannable('KNOWLEDGETYPEHUMOR', item('minecraft:pumpkin'))
Recipe Builder
Just like other recipe types, the Research also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.thaumcraft.research.researchCategoryBuilder()
String
. Sets a unique research key.groovykey(String)
ResourceLocation
. Sets the icon to be used for the research category tab.groovyicon(String) icon(String, String) icon(ResourceLocation)
AspectList
. Sets the aspects required to gain knowledge in this category.groovyformulaAspect(AspectStack) formulaAspect(String, int)
ResourceLocation
. Sets the resource location of the background image to use for this category.groovybackground(String) background(String, String) background(ResourceLocation)
ResourceLocation
. Sets the resource location of the foreground image that lies between the background and icons.groovybackground2(String) background2(String, String) background2(ResourceLocation)
String
. Sets the research that the player needs to have completed before this category becomes visible.null
causes it to always be visible.groovyresearchKey(String)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orthaumcraft.api.research.ResearchCategory
).groovyregister()
Example
mods.thaumcraft.research.researchCategoryBuilder()
.key('BASICS2')
.researchKey('UNLOCKAUROMANCY')
.formulaAspect(aspect('herba') * 5)
.formulaAspect(aspect('ordo') * 5)
.formulaAspect(aspect('perditio') * 5)
.formulaAspect('aer', 5)
.formulaAspect('ignis', 5)
.formulaAspect(aspect('terra') * 5)
.formulaAspect('aqua', 5)
.icon(resource('thaumcraft:textures/aspects/humor.png'))
.background(resource('thaumcraft:textures/gui/gui_research_back_1.jpg'))
.background2(resource('thaumcraft:textures/gui/gui_research_back_over.png'))
.register()
Removing Recipes
Removes a Research Category by the name:
groovymods.thaumcraft.research.removeCategory(String)
Removes all registered recipes:
groovymods.thaumcraft.research.removeAllCategories()
Example
mods.thaumcraft.research.removeCategory('BASICS')
mods.thaumcraft.research.removeAllCategories()