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.ExcavatorAdding 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.
Recipe Builder
Create the Recipe Builder.
groovymods.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 equal to the number of elements inores.groovyore(String, float) ore(OreDictIngredient, float)int. Sets the weight the Mineral Mix has to spawn in its allowed dimensions. (Default0).groovyweight(int)FloatArrayList. Sets the chance a given block output will contain the corresponding entry in ores. Requires exactly equal to the number of elements inchances.groovyore(String, float) ore(OreDictIngredient, float)boolean. Sets if thedimensionsproperty 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 (ifblacklistis false) or are prevented from generating in (ifblacklistis true).groovydimension(int) dimension(int...) dimension(Collection<Integer>)
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. (returnsnullorblusunrize.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()
