Sag Mill (Ender IO)
Description
Convert an input itemstack into up to 4 output itemstacks with chances, using energy. Output can be boosted by Grinding Balls based on set bonusType. Can be set to require at least SIMPLE, NORMAL, or ENHANCED tiers, or to IGNORE the tier. SIMPLE and IGNORE are effectively the same.
Identifier
Refer to this via any of the following:
mods.enderio.sag_mill/* Used as page default */
mods.enderio.sagmill
mods.enderio.sagMill
mods.enderio.SagMill
mods.enderio.sag
mods.enderio.Sag
mods.enderio.SAGMill
mods.eio.sag_mill
mods.eio.sagmill
mods.eio.sagMill
mods.eio.SagMill
mods.eio.sag
mods.eio.Sag
mods.eio.SAGMill
Adding Recipes
Recipe Builder
Just like other recipe types, the Sag Mill also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.enderio.sag_mill.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 1.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
ItemStackList
. Sets the item outputs of the recipe. Requires greater than or equal to 1 and less than or equal to 4.groovyoutput(ItemStack) output(ItemStack...) output(ItemStack, float) output(Collection<ItemStack>)
RecipeLevel
. Sets the minimum required machine tier of the recipe. (DefaultRecipeLevel.IGNORE
).groovytierAny() tierNormal() tierSimple() tierEnhanced()
int
. Sets the energy cost of the recipe. Requires greater than 0. (Default0
).groovyenergy(int)
FloatList
. Sets the chance the given output of each output slot.groovyoutput(ItemStack) output(ItemStack, float)
RecipeBonusType
. Sets the type of bonus a Grinding Ball can apply. (DefaultRecipeBonusType.NONE
).groovybonusTypeNone() bonusTypeChance() bonusTypeMultiply()
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
orcrazypants.enderio.base.recipe.Recipe
).groovyregister()
Example
mods.enderio.sag_mill.recipeBuilder()
.input(item('minecraft:diamond_block'))
.output(item('minecraft:diamond') * 4)
.output(item('minecraft:clay_ball') * 2, 0.7)
.output(item('minecraft:gold_ingot'), 0.1)
.output(item('minecraft:gold_ingot'), 0.1)
.bonusTypeMultiply()
.energy(1000)
.tierEnhanced()
.register()
mods.enderio.sag_mill.recipeBuilder()
.input(item('minecraft:clay_ball'))
.output(item('minecraft:diamond') * 4)
.output(item('minecraft:gold_ingot'), 0.1)
.bonusTypeChance()
.tierNormal()
.register()
mods.enderio.sag_mill.recipeBuilder()
.input(item('minecraft:diamond'))
.output(item('minecraft:gold_ingot'), 0.1)
.bonusTypeNone()
.tierSimple()
.register()
mods.enderio.sag_mill.recipeBuilder()
.input(item('minecraft:nether_star'))
.output(item('minecraft:clay_ball') * 2, 0.7)
.output(item('minecraft:gold_ingot'), 0.1)
.tierAny()
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.enderio.sag_mill.removeByInput(ItemStack)
Removes all registered recipes:
groovymods.enderio.sag_mill.removeAll()
Example
mods.enderio.sag_mill.removeByInput(item('minecraft:wheat'))
mods.enderio.sag_mill.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.enderio.sag_mill.streamRecipes()