Barrel (Pyrotech)
Description
Over time converts a fluid with four items into a new fluid.
Identifier
Refer to this via any of the following:
mods.pyrotech.barrel/* Used as page default */
mods.pyrotech.Barrel
Adding Recipes
Adds recipes in the format
name
,input1
,input2
,input3
,input4
,fluidInput
,fluidOutput
,duration
:groovymods.pyrotech.barrel.add(String, IIngredient, IIngredient, IIngredient, IIngredient, FluidStack, FluidStack, int)
Example
mods.pyrotech.barrel.add('iron_dirt_water_to_lava', ore('ingotIron'), ore('ingotIron'), item('minecraft:dirt'), item('minecraft:dirt'), fluid('water'), fluid('lava'), 1000)
Recipe Builder
Just like other recipe types, the Barrel also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.pyrotech.barrel.recipeBuilder()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 4.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
FluidStackList
. Sets the fluid inputs of the recipe. Requires exactly 1.groovyfluidInput(FluidStack) fluidInput(FluidStack...) fluidInput(Collection<FluidStack>)
FluidStackList
. Sets the fluid outputs of the recipe. Requires exactly 1.groovyfluidOutput(FluidStack) fluidOutput(FluidStack...) fluidOutput(Collection<FluidStack>)
int
. Sets the time required for the recipe to complete. Requires greater than or equal to 1. (Default0
).groovyduration(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
orcom.codetaylor.mc.pyrotech.modules.tech.basic.recipe.BarrelRecipe
).groovyregister()
Example
mods.pyrotech.barrel.recipeBuilder()
.input(item('minecraft:diamond'), item('minecraft:diamond'), item('minecraft:diamond'), item('minecraft:emerald'))
.fluidInput(fluid('water') * 1000)
.fluidOutput(fluid('amongium') * 1000)
.duration(1000)
.name('diamond_emerald_and_water_to_amongium')
.register()
Removing Recipes
Removes all recipes that match the given output:
groovymods.pyrotech.barrel.removeByOutput(FluidStack)
Removes all registered recipes:
groovymods.pyrotech.barrel.removeAll()
Example
mods.pyrotech.barrel.removeByOutput(fluid('freckleberry_wine') * 1000)
mods.pyrotech.barrel.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.pyrotech.barrel.streamRecipes()