Compressor (Avaritia)
Description
Converts any number of a single item into an output itemstack.
Identifier
Refer to this via any of the following:
mods.avaritia.compressor/* Used as page default */
mods.avaritia.Compressor
Adding Recipes
Adds recipes in the format
output
,input
,cost
:groovymods.avaritia.compressor.add(ItemStack, IIngredient, int)
Example
mods.avaritia.compressor.add(item('minecraft:nether_star'), item('minecraft:clay_ball'), 100)
Recipe Builder
Just like other recipe types, the Compressor also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.avaritia.compressor.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 exactly 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
int
. Sets the amount of items required to convert. (Default300
).groovyinput(IIngredient) inputCount(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
ormorph.avaritia.recipe.compressor.ICompressorRecipe
).groovyregister()
Example
mods.avaritia.compressor.recipeBuilder()
.input(item('minecraft:clay_ball') * 100)
.output(item('minecraft:nether_star'))
.inputCount(100)
.register()
Removing Recipes
Removes all recipes that match the given output:
groovymods.avaritia.compressor.removeByOutput(ItemStack)
Removes all registered recipes:
groovymods.avaritia.compressor.removeAll()
Example
mods.avaritia.compressor.removeByOutput(item('avaritia:singularity', 0))
mods.avaritia.compressor.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.avaritia.compressor.streamRecipes()