Light Transmutation (Astral Sorcery)
Description
Converts an input Block or IBlockState into an output IBlockState after being sent a given amount of starlight, with the ability to require a specific constellation of starlight.
Identifier
Refer to this via any of the following:
mods.astralsorcery.light_transmutation/* Used as page default */
mods.astralsorcery.lighttransmutation
mods.astralsorcery.lightTransmutation
mods.astralsorcery.LightTransmutation
mods.astral.light_transmutation
mods.astral.lighttransmutation
mods.astral.lightTransmutation
mods.astral.LightTransmutation
Adding Recipes
Recipe Builder
Just like other recipe types, the Light Transmutation also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.astralsorcery.light_transmutation.recipeBuilder()
double
. Sets the amount of starlight required to complete the craft. Requires greater than or equal to 0. (Default0.0d
).groovycost(double)
IBlockState
. Sets the input IBlockState, recipe will convert only the given blockstate. Requires not null and not inBlock.groovyinput(IBlockState)
IBlockState
. Sets the output IBlockState. Requires not null.groovyoutput(Block) output(IBlockState)
Block
. Sets the input Block, recipe will convert any blockstate of the provided block. Requires not null and not input.groovyinput(Block)
ItemStack
. Sets the item representing the input Block or IBlockState in JEI.groovyinputDisplayStack(ItemStack)
ItemStack
. Sets the item representing the output IBlockState in JEI.groovyoutputDisplayStack(ItemStack)
IWeakConstellation
. Sets the required Constellation the starlight must be collected from. Must be either a Major or Weak Constellation.groovyconstellation(IWeakConstellation)
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.base.LightOreTransmutations$Transmutation
).groovyregister()
Example
mods.astralsorcery.light_transmutation.recipeBuilder()
.input(block('minecraft:stone'))
.output(block('astralsorcery:blockmarble'))
.cost(100.0)
.constellation(constellation('armara'))
.inputDisplayStack(item('minecraft:stone'))
.outputDisplayStack(item('minecraft:dye:15').withNbt([display:[Name:'Marble']]))
.register()
mods.astralsorcery.light_transmutation.recipeBuilder()
.input(blockstate('minecraft:pumpkin'))
.output(blockstate('minecraft:diamond_block'))
.cost(0)
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.astralsorcery.light_transmutation.removeByInput(Block)
Removes all recipes that match the given input:
groovymods.astralsorcery.light_transmutation.removeByInput(IBlockState)
Removes all recipes that match the given output:
groovymods.astralsorcery.light_transmutation.removeByOutput(Block)
Removes all recipes that match the given output:
groovymods.astralsorcery.light_transmutation.removeByOutput(IBlockState)
Removes all registered recipes:
groovymods.astralsorcery.light_transmutation.removeAll()
Example
mods.astralsorcery.light_transmutation.removeByInput(block('minecraft:netherrack'))
mods.astralsorcery.light_transmutation.removeByInput(blockstate('minecraft:sandstone'))
mods.astralsorcery.light_transmutation.removeByOutput(block('minecraft:lapis_block'))
mods.astralsorcery.light_transmutation.removeByOutput(blockstate('minecraft:cake'))
mods.astralsorcery.light_transmutation.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.light_transmutation.streamRecipes()