Reservoir (Immersive Petroleum)
Description
Adds a Reservoir Type with the given name, weight, minimum size, maximum size, replenishment rate, allowed dimensions, and allowed biomes. A Reservoir Type can be extracted by an Pumpjack Multiblock and scanned via a Core Sample Drill.
Warning
Reloading will not change chunks already 'discovered'.
Identifier
Refer to this via any of the following:
mods.immersivepetroleum.reservoir/* Used as page default */
mods.immersivepetroleum.Reservoir
Adding Entries
Recipe Builder
Just like other recipe types, the Reservoir also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.immersivepetroleum.reservoir.recipeBuilder()
FluidStackList
. Sets the fluid outputs of the recipe. Requires exactly 1.groovyfluidOutput(FluidStack) fluidOutput(FluidStack...) fluidOutput(Collection<FluidStack>)
String
. Sets the name of the reservoir.groovyname(String)
List<String>
. Sets the list of biome names the vein can generate in (ifbiomeBlacklist
is false) or are prevented from generating in (ifbiomeBlacklist
is true).groovybiome(String) biome(String...) biome(Collection<String>)
int
. Sets the weight the reservoir has to spawn in its allowed dimensions. (Default0
).groovyweight(int)
int
. Sets the maximum size the reservoir can be, in mb. Requires greater than or equal to 1 and less than or equal to the number of elements inmaxSize
. (Default0
).groovymaxSize(int)
int
. Sets the minimum size the reservoir can be, in mb. Requires greater than or equal to 1 and greater than or equal to the number of elements inminSize
. (Default0
).groovyminSize(int)
IntArrayList
. Sets the list of dimension ids the vein can generate in (ifdimensionBlacklist
is false) or are prevented from generating in (ifdimensionBlacklist
is true).groovydimension(int) dimension(int...) dimension(Collection<Integer>)
int
. Sets the rate at which the reservoir is refilled, in. Requires greater than or equal to 1. (Default0
).groovyreplenishRate(int)
boolean
. Sets if thebiomes
property indicates allowed biomes (false) or blocked biomes (true). (Defaultfalse
).groovybiomeBlacklist() biomeBlacklist(boolean)
boolean
. Sets if thedimensions
property indicates allowed dimensions (false) or blocked dimensions (true). (Defaultfalse
).groovydimensionBlacklist() dimensionBlacklist(boolean)
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
orflaxbeard.immersivepetroleum.api.crafting.PumpjackHandler$ReservoirType
).groovyregister()
Example
mods.immersivepetroleum.reservoir.recipeBuilder()
.name('demo')
.fluidOutput(fluid('water'))
.weight(20000)
.minSize(100)
.maxSize(100)
.dimension(0, 1)
.biome('hot')
.register()
mods.immersivepetroleum.reservoir.recipeBuilder()
.name('demo')
.fluidOutput(fluid('lava'))
.weight(2000)
.minSize(1000)
.maxSize(5000)
.replenishRate(100)
.dimension(-1, 1)
.dimensionBlacklist()
.biome('cold')
.biomeBlacklist()
.register()
Removing Entries
Removes the Reservoir entry with the given name:
groovymods.immersivepetroleum.reservoir.removeByName(String)
Removes all recipes that match the given output:
groovymods.immersivepetroleum.reservoir.removeByOutput(FluidStack)
Removes all registered recipes:
groovymods.immersivepetroleum.reservoir.removeAll()
Example
mods.immersivepetroleum.reservoir.removeByName('aquifer')
mods.immersivepetroleum.reservoir.removeByOutput(fluid('oil'))
mods.immersivepetroleum.reservoir.removeAll()
Getting the value of entries
Iterates through every entry in the registry, with the ability to call remove on any element to remove it:
groovymods.immersivepetroleum.reservoir.streamRecipes()