Compression Crafting (Extended Crafting)
Description
Converts any number of a single item into an output itemstack, with a configurable rf cost, consumption per tick amount, catalyst, and if the catalyst is consumed.
Identifier
Refer to this via any of the following:
mods.extendedcrafting.compression_crafting/* Used as page default */
mods.extendedcrafting.compressioncrafting
mods.extendedcrafting.compressionCrafting
mods.extendedcrafting.CompressionCrafting
mods.extendedcrafting.compression
mods.extendedcrafting.Compression
Adding Recipes
Adds recipes in the format
output
,input
,inputCount
,catalyst
,consumeCatalyst
,powerCost
:groovymods.extendedcrafting.compression_crafting.add(ItemStack, IIngredient, int, IIngredient, boolean, int)
Adds recipes in the format
output
,input
,inputCount
,catalyst
,consumeCatalyst
,powerCost
,powerRate
:groovymods.extendedcrafting.compression_crafting.add(ItemStack, IIngredient, int, IIngredient, boolean, int, int)
Recipe Builder
Just like other recipe types, the Compression Crafting also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.extendedcrafting.compression_crafting.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires not null.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>)
IIngredient
. Sets the catalyst item for the recipe. Requires not null. (DefaultIngredientHelper.toIIngredient(ItemSingularity.getCatalystStack())
).groovycatalyst(IIngredient)
int
. Sets the amount of RF required to complete the craft. Requires greater than or equal to 0. (Default0
).groovypowerCost(int)
int
. Sets the maximum amount of RF consumed per tick until the entire cost is paid. Requires greater than or equal to 0. (DefaultModConfig.confCompressorRFRate
).groovypowerRate(int)
int
. Sets the quantity of input items required. Requires greater than or equal to 0. (Default0
).groovyinputCount(int)
boolean
. Sets if the catalyst item is consumed when the recipe completes. (Defaultfalse
).groovyconsumeCatalyst(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
orcom.blakebr0.extendedcrafting.crafting.CompressorRecipe
).groovyregister()
Example
mods.extendedcrafting.compression_crafting.recipeBuilder()
.input(item('minecraft:clay'))
.inputCount(100)
.output(item('minecraft:gold_ingot') * 7)
.catalyst(item('minecraft:diamond'))
.consumeCatalyst(true)
.powerCost(10000)
.powerRate(1000)
.register()
mods.extendedcrafting.compression_crafting.recipeBuilder()
.input(item('minecraft:clay') * 10)
.output(item('minecraft:diamond') * 2)
.powerCost(1000)
.register()
Removing Recipes
Removes all recipes that match the given catalyst:
groovymods.extendedcrafting.compression_crafting.removeByCatalyst(IIngredient)
Removes all recipes that match the given input:
groovymods.extendedcrafting.compression_crafting.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.extendedcrafting.compression_crafting.removeByOutput(ItemStack)
Removes all registered recipes:
groovymods.extendedcrafting.compression_crafting.removeAll()
Example
mods.extendedcrafting.compression_crafting.removeByCatalyst(item('extendedcrafting:material:11'))
mods.extendedcrafting.compression_crafting.removeByInput(item('minecraft:gold_ingot'))
mods.extendedcrafting.compression_crafting.removeByOutput(item('extendedcrafting:singularity:6'))
mods.extendedcrafting.compression_crafting.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.extendedcrafting.compression_crafting.streamRecipes()