Crushing Tub (Rustic)
Description
Convert items into a fluidstacks and optionally itemstacks when any entity, typically a player, lands atop it.
Identifier
Refer to this via any of the following:
mods.rustic.crushing_tub/* Used as page default */
mods.rustic.crushingtub
mods.rustic.crushingTub
mods.rustic.CrushingTub
Adding Recipes
Add the given recipe to the recipe list:
groovymods.rustic.crushing_tub.add(ICrushingTubRecipe)
Recipe Builder
Just like other recipe types, the Crushing Tub also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.rustic.crushing_tub.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 1.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
FluidStackList
. Sets the fluid outputs of the recipe. Requires exactly 1.groovyfluidOutput(FluidStack) fluidOutput(FluidStack...) fluidOutput(Collection<FluidStack>)
ItemStack
. Sets the itemstack output in addition to the fluid.groovybyproduct(ItemStack)
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
orrustic.common.crafting.ICrushingTubRecipe
).groovyregister()
Example
mods.rustic.crushing_tub.recipeBuilder()
.input(item('minecraft:stone'))
.fluidOutput(fluid('lava') * 50)
.register()
mods.rustic.crushing_tub.recipeBuilder()
.input(item('minecraft:clay'))
.fluidOutput(fluid('lava') * 20)
.byproduct(item('minecraft:gold_ingot') * 4)
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.rustic.crushing_tub.remove(ICrushingTubRecipe)
Removes all recipes that match the given input:
groovymods.rustic.crushing_tub.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.rustic.crushing_tub.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.rustic.crushing_tub.removeAll()
Example
mods.rustic.crushing_tub.removeByInput(item('rustic:wildberries'))
mods.rustic.crushing_tub.removeByOutput(fluid('ironberryjuice'))
mods.rustic.crushing_tub.removeByOutput(item('minecraft:sugar'))
mods.rustic.crushing_tub.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.rustic.crushing_tub.streamRecipes()