Chalice Interaction (Astral Sorcery)
Description
When two chalices containing different fluids are placed nearby, fluid may be consumed to produce an output itemstack.
Identifier
The identifier mods.astralsorcery.chalice_interaction will be used as the default on this page.
All Identifiers
Any of these can be used to refer to this compat:
mods.astral.chaliceinteraction
mods.astral.chaliceInteraction
mods.astral.ChaliceInteraction
mods.astral.chalice_interaction
mods.astralsorcery.chaliceinteraction
mods.astralsorcery.chaliceInteraction
mods.astralsorcery.ChaliceInteraction
mods.astralsorcery.chalice_interaction/* Used as page default */Adding Recipes
Add the given recipe to the recipe list:
groovymods.astralsorcery.chalice_interaction.add(LiquidInteraction)Adds entries in the format
probability,component1,component2,action:groovymods.astralsorcery.chalice_interaction.add(int, FluidStack, FluidStack, LiquidInteraction.FluidInteractionAction)
Recipe Builder
Just like other recipe types, the Chalice Interaction also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
Recipe Builder
Create the Recipe Builder.
groovymods.astralsorcery.chalice_interaction.recipeBuilder()
FluidStackList. Sets the fluid inputs of the recipe. Requires exactly 2.groovycomponent(FluidStack) component(FluidStack, float) // 100% chance fluidInput(FluidStack) // 100% chance fluidInput(FluidStack...) fluidInput(FluidStack, float) fluidInput(Collection<FluidStack>)ItemStackList. Sets the item outputs of the recipe. Requires greater than or equal to 0.groovyoutput(ItemStack) // 100% chance output(ItemStack...) output(ItemStack, int) output(Collection<ItemStack>) result(ItemStack) // 100% chance result(ItemStack, int)FloatArrayList. Sets the chance to consume fluids from the Chalices. Requires exactly 2.groovycomponent(FluidStack) component(FluidStack, float) // 100% chance fluidInput(FluidStack) // 100% chance fluidInput(FluidStack, float)IntArrayList. Sets the chance a given output will occur among all possible combinations of the fluid. Requires greater than 0.groovyoutput(ItemStack) // 100% chance output(ItemStack, int) result(ItemStack) // 100% chance result(ItemStack, int)
First validates the builder, returning
nulland outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnullorhellfirepvp.astralsorcery.common.base.LiquidInteraction).groovyregister()
Example
mods.astralsorcery.chalice_interaction.recipeBuilder()
.output(item('astralsorcery:blockmarble'))
.fluidInput(fluid('water') * 10)
.fluidInput(fluid('astralsorcery.liquidstarlight') * 30)
.register()Removing Recipes
Removes the given recipe from the recipe list:
groovymods.astralsorcery.chalice_interaction.remove(LiquidInteraction)Removes all recipes that match the given input:
groovymods.astralsorcery.chalice_interaction.removeByInput(Fluid)Removes all recipes that match the given input:
groovymods.astralsorcery.chalice_interaction.removeByInput(FluidStack)Removes all recipes that match the given input:
groovymods.astralsorcery.chalice_interaction.removeByInput(Fluid, Fluid)Removes all recipes that match the given input:
groovymods.astralsorcery.chalice_interaction.removeByInput(FluidStack, FluidStack)Removes all recipes that match the given output:
groovymods.astralsorcery.chalice_interaction.removeByOutput(ItemStack)Removes all registered recipes:
groovymods.astralsorcery.chalice_interaction.removeAll()
Example
mods.astralsorcery.chalice_interaction.removeByInput(fluid('astralsorcery.liquidstarlight'))
mods.astralsorcery.chalice_interaction.removeByInput(fluid('water'), fluid('lava'))
mods.astralsorcery.chalice_interaction.removeByOutput(item('minecraft:ice'))
mods.astralsorcery.chalice_interaction.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.chalice_interaction.streamRecipes()
