Starlight Altar (Astral Sorcery)
Description
Allows creation of shaped recipes in the Astral Sorcery Crafting Altar chain.
Identifier
Refer to this via any of the following:
mods.astralsorcery.starlight_altar/* Used as page default */
mods.astralsorcery.starlightaltar
mods.astralsorcery.starlightAltar
mods.astralsorcery.StarlightAltar
mods.astral.starlight_altar
mods.astral.starlightaltar
mods.astral.starlightAltar
mods.astral.StarlightAltar
Adding Recipes
Recipe Builder
Just like other recipe types, the Starlight Altar also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.astralsorcery.starlight_altar.discoveryRecipeBuilder()
String[]
. Sets the items required in each slot of the grid as char. Requires either the key-based matrix or the ingredient-based matrix can be defined, not both.groovyrow(String) shape(String...) matrix(String...)
List<List<IIngredient>>
. Sets the items required in each slot in the grid as IIngredients. Requires greater than or equal to 1 and less than or equal to 9. Requires either the key-based matrix or the ingredient-based matrix can be defined, not both.groovyshape(List<List<IIngredient>>) matrix(List<List<IIngredient>>)
Char2ObjectOpenHashMap<IIngredient>
. Sets the item the given char corresponds to. (Default' ' = IIngredient.EMPTY
).groovykey(char, IIngredient) key(String, IIngredient) key(Map<String, IIngredient>)
ItemStack
. Sets the item output. Requires not null.groovyoutput(ItemStack)
String
. Sets the name of the recipe, should be unique.groovyname(String)
int
. Sets how long the craft will take to complete in ticks. Requires greater than 0. (Default1
).groovycraftTime(int)
int
. Sets the amount of starlight the recipe requires. Has a cap based on the table tier, of 1000, 2000, 4000, 8000 for Luminous, Starlight, Celestial, and Iridescent respectively. Requires greater than or equal to 1 and less than or equal to 1000. (Default1
).groovystarlight(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
orhellfirepvp.astralsorcery.common.crafting.altar.AbstractAltarRecipe
).groovyregister()
Example
mods.astralsorcery.starlight_altar.discoveryRecipeBuilder()
.output(item('minecraft:water_bucket'))
.row(' ')
.row(' B ')
.row(' ')
.key('B', item('minecraft:bucket'))
.starlight(500)
.craftTime(10)
.register()
mods.astralsorcery.starlight_altar.attunementRecipeBuilder()
String[]
. Sets the items required in each slot of the grid as char. Requires either the key-based matrix or the ingredient-based matrix can be defined, not both.groovyrow(String) shape(String...) matrix(String...)
List<List<IIngredient>>
. Sets the items required in each slot in the grid as IIngredients. Requires greater than or equal to 1 and less than or equal to 13. Requires either the key-based matrix or the ingredient-based matrix can be defined, not both.groovyshape(List<List<IIngredient>>) matrix(List<List<IIngredient>>)
Char2ObjectOpenHashMap<IIngredient>
. Sets the item the given char corresponds to. (Default' ' = IIngredient.EMPTY
).groovykey(char, IIngredient) key(String, IIngredient) key(Map<String, IIngredient>)
ItemStack
. Sets the item output. Requires not null.groovyoutput(ItemStack)
String
. Sets the name of the recipe, should be unique.groovyname(String)
int
. Sets how long the craft will take to complete in ticks. Requires greater than 0. (Default1
).groovycraftTime(int)
int
. Sets the amount of starlight the recipe requires. Has a cap based on the table tier, of 1000, 2000, 4000, 8000 for Luminous, Starlight, Celestial, and Iridescent respectively. Requires greater than or equal to 1 and less than or equal to 2000. (Default1
).groovystarlight(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
orhellfirepvp.astralsorcery.common.crafting.altar.AbstractAltarRecipe
).groovyregister()
mods.astralsorcery.starlight_altar.constellationRecipeBuilder()
String[]
. Sets the items required in each slot of the grid as char. Requires either the key-based matrix or the ingredient-based matrix can be defined, not both.groovyrow(String) shape(String...) matrix(String...)
List<List<IIngredient>>
. Sets the items required in each slot in the grid as IIngredients. Requires greater than or equal to 1 and less than or equal to 21. Requires either the key-based matrix or the ingredient-based matrix can be defined, not both.groovyshape(List<List<IIngredient>>) matrix(List<List<IIngredient>>)
Char2ObjectOpenHashMap<IIngredient>
. Sets the item the given char corresponds to. (Default' ' = IIngredient.EMPTY
).groovykey(char, IIngredient) key(String, IIngredient) key(Map<String, IIngredient>)
ItemStack
. Sets the item output. Requires not null.groovyoutput(ItemStack)
String
. Sets the name of the recipe, should be unique.groovyname(String)
int
. Sets how long the craft will take to complete in ticks. Requires greater than 0. (Default1
).groovycraftTime(int)
int
. Sets the amount of starlight the recipe requires. Has a cap based on the table tier, of 1000, 2000, 4000, 8000 for Luminous, Starlight, Celestial, and Iridescent respectively. Requires greater than or equal to 1 and less than or equal to 4000. (Default1
).groovystarlight(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
orhellfirepvp.astralsorcery.common.crafting.altar.AbstractAltarRecipe
).groovyregister()
Example
mods.astralsorcery.starlight_altar.constellationRecipeBuilder()
.output(item('minecraft:pumpkin'))
.matrix('ss ss',
's s',
' d ',
's s',
'ss ss')
.key('s', item('minecraft:pumpkin_seeds'))
.key('d', ore('dirt'))
.register()
mods.astralsorcery.starlight_altar.traitRecipeBuilder()
String[]
. Sets the items required in each slot of the grid as char. Requires either the key-based matrix or the ingredient-based matrix can be defined, not both.groovyrow(String) shape(String...) matrix(String...)
List<List<IIngredient>>
. Sets the items required in each slot in the grid as IIngredients. Requires greater than or equal to 1 and less than or equal to 25. Requires either the key-based matrix or the ingredient-based matrix can be defined, not both.groovyshape(List<List<IIngredient>>) matrix(List<List<IIngredient>>)
Char2ObjectOpenHashMap<IIngredient>
. Sets the item the given char corresponds to. (Default' ' = IIngredient.EMPTY
).groovykey(char, IIngredient) key(String, IIngredient) key(Map<String, IIngredient>)
ItemStack
. Sets the item output. Requires not null.groovyoutput(ItemStack)
String
. Sets the name of the recipe, should be unique.groovyname(String)
int
. Sets how long the craft will take to complete in ticks. Requires greater than 0. (Default1
).groovycraftTime(int)
List<IIngredient>
. Sets items placed on nearby relays once the recipe starts. Must be placed manually. Requires greater than or equal to 0 and less than or equal to 24.groovyouterInput(IIngredient) outerInput(IIngredient...) outerInput(Collection<IIngredient>)
int
. Sets the amount of starlight the recipe requires. Has a cap based on the table tier, of 1000, 2000, 4000, 8000 for Luminous, Starlight, Celestial, and Iridescent respectively. Requires greater than or equal to 1 and less than or equal to 8000. (Default1
).groovystarlight(int)
IConstellation
. Sets the required Constellation for the Rock Crystal to be attuned to. Only applies to Iridescent Altars.groovyconstellation(IConstellation)
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
orhellfirepvp.astralsorcery.common.crafting.altar.AbstractAltarRecipe
).groovyregister()
Example
mods.astralsorcery.starlight_altar.traitRecipeBuilder()
.output(item('astralsorcery:itemrockcrystalsimple').setSize(300).setPurity(50).setCutting(50))
.matrix('sssss',
'sgggs',
'sgdgs',
'sgggs',
'sssss')
.key('s', item('minecraft:pumpkin'))
.key('g', ore('treeLeaves'))
.key('d', item('minecraft:diamond_block'))
.outerInput(item('astralsorcery:blockmarble'))
.outerInput(ore('ingotAstralStarmetal'))
.outerInput(fluid('astralsorcery.liquidstarlight') * 1000)
.outerInput(ore('treeSapling'))
.constellation(constellation('discidia'))
.register()
Removing Recipes
Removes all recipes that match the given output in all Altar tiers:
groovymods.astralsorcery.starlight_altar.removeByOutput(ItemStack)
Removes all recipes that match the given output in only the specified Altar tier, in the format
output
,altarLevel
:groovymods.astralsorcery.starlight_altar.removeByOutput(ItemStack, TileAltar.AltarLevel)
Removes all registered recipes:
groovymods.astralsorcery.starlight_altar.removeAll()
Example
mods.astralsorcery.starlight_altar.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.astralsorcery.starlight_altar.streamRecipes()