Excavator (Immersive Engineering)
Description
Adds a Mineral Mix with the given name, weight, fail chance, ores, and allowed dimensions. A Mineral Mix can be mined by an Excavator 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.ie.excavator
mods.ie.Excavator
mods.immersiveengineering.excavator/* Used as page default */
mods.immersiveengineering.Excavator
Adding Entries
Adds entries in the format
name
,mineralWeight
,failChance
,ores
,chances
:groovymods.immersiveengineering.excavator.add(String, int, float, String[], float[])
Recipe Builder
Just like other recipe types, the Excavator also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.immersiveengineering.excavator.recipeBuilder()
float
. Sets the chance that a given mining attempt with output nothing instead of an ore. Requires greater than or equal to 0 and less than or equal to 1. (Default0.0f
).groovyfail(float)
String
. Sets the unique name of the vein.groovyname(String)
List<String>
. Sets the valid oredicts output. Requires exactly chances.groovyore(String, float) ore(OreDictIngredient, float)
int
. Sets the weight the Mineral Mix has to spawn in its allowed dimensions. (Default0
).groovyweight(int)
List<Float>
. Sets the chance a given block output will contain the corresponding entry in ores. Requires exactly ores.groovyore(String, float) ore(OreDictIngredient, float)
boolean
. Sets if thedimensions
property indicates allowed dimensions (false) or blocked dimensions (true). (Defaultfalse
).groovyblacklist() blacklist(boolean)
List<Integer>
. Sets the list of dimension ids the vein can generate in (ifblacklist
is false) or are prevented from generating in (ifblacklist
is true).groovydimension(int) dimension(int...) dimension(Collection<Integer>)
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
orblusunrize.immersiveengineering.api.tool.ExcavatorHandler$MineralMix
).groovyregister()
Example
mods.immersiveengineering.excavator.recipeBuilder()
.name('demo')
.weight(20000)
.fail(0.5)
.ore(ore('blockDiamond'), 50)
.ore('blockGold', 10)
.dimension(0, 1)
.register()
mods.immersiveengineering.excavator.recipeBuilder()
.name('demo')
.weight(2000)
.fail(0.1)
.ore(ore('blockDiamond'), 50)
.dimension(-1, 1)
.blacklist()
.register()
Removing Entries
Removes the Mineral Mix entry with the given name:
groovymods.immersiveengineering.excavator.removeByMineral(String)
Removes all Mineral Mix entries containing any of the given ores:
groovymods.immersiveengineering.excavator.removeByOres(OreDictIngredient...)
Removes all Mineral Mix entries containing any of the given ores:
groovymods.immersiveengineering.excavator.removeByOres(String...)
Removes all registered recipes:
groovymods.immersiveengineering.excavator.removeAll()
Example
mods.immersiveengineering.excavator.removeByMineral('silt')
mods.immersiveengineering.excavator.removeByOres(ore('oreAluminum'))
mods.immersiveengineering.excavator.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.immersiveengineering.excavator.streamRecipes()