Fountain (Astral Sorcery)
Description
Adds virtual aquifers that can be accessed via the Evershifting Fountain's Necromantic Prime.
Identifier
Refer to this via any of the following:
mods.astralsorcery.fountain/* Used as page default */
mods.astralsorcery.Fountain
mods.astral.fountain
mods.astral.Fountain
Adding Recipes
Adds recipes in the format
fluid
,rarity
,guaranteedAmt
,addRand
:groovymods.astralsorcery.fountain.add(Fluid, int, int, int)
Adds an existing
FluidRarityEntry
to the registry:groovymods.astralsorcery.fountain.add(FluidRarityRegistry.FluidRarityEntry)
Adds recipes in the format
fluid
,rarity
,guaranteedAmt
,addRand
:groovymods.astralsorcery.fountain.add(FluidStack, int, int, int)
Recipe Builder
Just like other recipe types, the Fountain also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.astralsorcery.fountain.chanceHelper()
Fluid
. Sets the fluid being generated. Requires not null.groovyfluid(Fluid) fluid(FluidStack)
int
. Sets the frequency the fluid generates in a chunk. Requires greater than or equal to 0. (Default0
).groovyrarity(int)
int
. Sets the maximum amount of additional fluid that can be generated in a chunk. Requires greater than or equal to 0. (Default0
).groovyvariance(int)
int
. Sets the minimum amount of fluid in a chunk. Requires greater than or equal to 0. (Default0
).groovyminimumAmount(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.base.FluidRarityRegistry$FluidRarityEntry
).groovyregister()
Example
mods.astralsorcery.fountain.chanceHelper()
.fluid(fluid('astralsorcery.liquidstarlight'))
.rarity(10000000)
.minimumAmount(4000000)
.variance(1000000)
.register()
Removing Recipes
Removes an entry matching the given
Fluid
:groovymods.astralsorcery.fountain.remove(Fluid)
Removes an existing
FluidRarityEntry
:groovymods.astralsorcery.fountain.remove(FluidRarityRegistry.FluidRarityEntry)
Removes an entry matching the given
FluidStack
:groovymods.astralsorcery.fountain.remove(FluidStack)
Removes all registered recipes:
groovymods.astralsorcery.fountain.removeAll()
Example
mods.astralsorcery.fountain.remove(fluid('lava'))
mods.astralsorcery.fountain.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.fountain.streamRecipes()