Aspect Creator (Thaumcraft)
Description
Creates a custom Aspect.
Identifier
Refer to this via any of the following:
mods.thaumcraft.aspect/* Used as page default */
mods.thaumcraft.Aspect
mods.tc.aspect
mods.tc.Aspect
mods.thaum.aspect
mods.thaum.Aspect
Adding Recipes
Recipe Builder
Just like other recipe types, the Aspect Creator also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.thaumcraft.aspect.aspectBuilder()
String
. Sets the name of the new Aspect. Requires not null. Requires the name must be a unique string.groovytag(String)
int
. Sets the blend value of the Aspect. (Default1
).groovyblend(int)
ResourceLocation
. Sets the resource location of the image used to represent the Aspect.groovyimage(String) image(String, String) image(ResourceLocation)
int
. Sets the color formatting code used. (Default0
).groovychatColor(int)
AspectList
. Sets the other Aspects that make up this Aspect. Requires greater than or equal to 0 and less than or equal to 2.groovycomponent(String) component(AspectStack) component(String, int)
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.aspects.Aspect
).groovyregister()
Example
mods.thaumcraft.aspect.aspectBuilder()
.tag('humor')
.chatColor(14013676)
.component(aspect('cognitio'))
.component('perditio')
.image(resource('thaumcraft:textures/aspects/humor.png'))
.register()
Removing Recipes
Removes all registered recipes:
groovymods.thaumcraft.aspect.removeAll()
Example
mods.thaumcraft.aspect.removeAll()
Getting the value of recipes
Iterates through every entry in the registry, with the ability to call remove on any element to remove it:
groovymods.thaumcraft.aspect.streamRecipes()